-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aerospike php8 client return null if data inserted through old client #39
Comments
Hi, could you clarify what you mean by the "old client"? An older release of the current PHP 8 compatible version (that we have recently released), or the older C-based version of the client? |
The C-based version which supports till php7 |
Could you please share a code snippet that reproduces the issue (in both the new and old client code)? Regarding the key value, are you setting the |
Below are the code snippets for both clients $t = new Testing(); $config = []; $config['hosts'][0] =[ $options = [ New Client php8 sample code namespace Aerospike; $socket = "/var/www/html/asld_grpc.sock"; print_r($record); function initKey($ns, $set, $key){
No. I'll try and let you know |
@khaf : Have you seen this issue? |
|
@piyush-bansal1989 Sorry for the late reply. Using the latest PHP client, I cannot reproduce the key issue. The original key value is stored and returned by the client. There is a bug in converting long values in the connection manager that we will address in the release next week. |
@piyush-bansal1989 Here is the code I used to do it: $bytes = [0x4F, 0x3A, 0x32, 0x39, 0x3A, 0x22, 0x43, 0x6F, 0x6D, 0x70, 0x6F, 0x6E, 0x65, 0x6E, 0x74, 0x73, 0x5C, 0x54, 0x69, 0x6F, 0x5C, 0x54, 0x65, 0x73, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6C, 0x73, 0x54, 0x69, 0x6F, 0x22, 0x3A, 0x35, 0x30, 0x3A, 0x7B, 0x73, 0x3A, 0x37, 0x3A, 0x22, 0x61, 0x6D, 0x63, 0x61, 0x74, 0x49, 0x64, 0x22, 0x3B, 0x73, 0x3A, 0x31, 0x34, 0x3A, 0x22, 0x31, 0x31, 0x32, 0x36, 0x30, 0x30, 0x30, 0x35, 0x32, 0x35, 0x33, 0x36, 0x30, 0x35, 0x22, 0x3B, 0x73, 0x3A, 0x36, 0x3A, 0x22, 0x74, 0x65, 0x73];
$s = pack('C*', ...$bytes);
$object = unserialize($s); You can of course use serialize to convert the object to a string and then later to a byte array: $s = serialize($object); |
Hi Team
I'm encountering a data discrepancy with a new client. Data saved through the old client isn't being retrieved correctly by the new client. Specifically, the new client returns a null value for the key (Primary Key), where the old client successfully stores a value.
I also found some data save format discrepancy in old have found format like below. In new client data saving as json string.
format through old client
4F 3A 32 39 3A 22 43 6F 6D 70 6F 6E 65 6E 74 73 5C 54 69 6F 5C 54 65 73 74 44 65 74 61 69 6C 73 54 69 6F 22 3A 35 30 3A 7B 73 3A 37 3A 22 61 6D 63 61 74 49 64 22 3B 73 3A 31 34 3A 22 31 31 32 36 30 30 30 35 32 35 33 36 30 35 22 3B 73 3A 36 3A 22 74 65 73
The text was updated successfully, but these errors were encountered: