[
https://issues.apache.org/jira/browse/IGNITE-3772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16919401#comment-16919401
]
Alexandre SIMON commented on IGNITE-3772:
-----------------------------------------
[~auszone] I even here have a limit of 2000 bytes with a PHP client.
{code:java}
<?php
$client = new Memcached();
$client->addServer("ignite1", 11211);
$client->setOption(Memcached::OPT_BINARY_PROTOCOL, true);
function storeAndAssert($key, $value) {
global $client;
echo "*** Test to store $key, len=".strlen($value)."***\n";
if ($client->set($key, $value)) {
echo "set return OK\n";
if ($storedValue = $client->get($key) != $value) {
echo "Server key value holding KO: ".$storedValue."\n";
} else {
echo "Server key value holding OK\n";
}
} else {
echo "set return KO\n";
}
}
function genValue($len) {
return str_repeat('a', $len);
}
storeAndAssert('toto', 'val'.uniqid());
storeAndAssert('v1', genValue(100));
storeAndAssert('v1', genValue(500));
storeAndAssert('v1', genValue(1000));
storeAndAssert('v1', genValue(2000));
storeAndAssert('v1', genValue(1999));
{code}
Ouput :
{code:java}
*** Test to store toto, len=16***
set return OK
Server key value holding OK
*** Test to store v1, len=100***
set return OK
Server key value holding OK
*** Test to store v1, len=500***
set return OK
Server key value holding OK
*** Test to store v1, len=1000***
set return OK
Server key value holding OK
*** Test to store v1, len=2000***
set return OK
Server key value holding KO: 1
*** Test to store v1, len=1999***
set return OK
Server key value holding OK
{code}
As I suspect you would ask, PHP version is 7.2.21, libmemcached 1.0.18, pecl
memcached 3.1.3.
But the more important thing is that with the same runtime and code client from
a real memcached (1.5.16), everything is fine...
Any change this get resolved ?
Thanks.
> Large values are corrupted when saved via Memcached client
> ----------------------------------------------------------
>
> Key: IGNITE-3772
> URL: https://issues.apache.org/jira/browse/IGNITE-3772
> Project: Ignite
> Issue Type: Bug
> Components: clients
> Affects Versions: 1.7
> Reporter: Valentin Kulichenko
> Priority: Major
>
> When a value which is larger than 32768 bytes is saved via Memcached client,
> it ends up corrupted in cache. Most likely something wrong with the parsing
> and the length of binary value is calculated incorrectly.
> Modified {{MemcacheRestExample}} which reproduces the issue is attached.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)