You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When performing a get with a cas token requested a multi-get is performed
internally. After doing so
only the first result is fetched, leaving the final RES_END result on the
stack.
As per the
libmemcached documentation memcached_fetch_result should be called until it
returns NULL following a
multi-get.
In some circumstances this is not noticeable as libmemcached takes care of
flushing the receive buffers
accordingly, however certain subsequent operations will incorrectly return
the
left-over RES_END result.
I have seen this behaviour exhibited when performing a get with cas token
request followed by an add
operation though there may be other examples.
I have tested this with memcached extension version 2.0.0b2 using
libmemcached
0.53 and 1.0.2, though I
believe the issue also exists with earlier versions.
Please find attached a patch against 2.0.0b2 to address this issue which
both
resolves the primary issue
and also simplifies the call in the case that a cas token is not required
by
calling
memcached_get_by_key.
The text was updated successfully, but these errors were encountered:
Description:
When performing a get with a cas token requested a multi-get is performed
internally. After doing so
only the first result is fetched, leaving the final RES_END result on the
stack.
As per the
libmemcached documentation memcached_fetch_result should be called until it
returns NULL following a
multi-get.
In some circumstances this is not noticeable as libmemcached takes care of
flushing the receive buffers
accordingly, however certain subsequent operations will incorrectly return
the
left-over RES_END result.
I have seen this behaviour exhibited when performing a get with cas token
request followed by an add
operation though there may be other examples.
I have tested this with memcached extension version 2.0.0b2 using
libmemcached
0.53 and 1.0.2, though I
believe the issue also exists with earlier versions.
Please find attached a patch against 2.0.0b2 to address this issue which
both
resolves the primary issue
and also simplifies the call in the case that a cas token is not required
by
calling
memcached_get_by_key.
The text was updated successfully, but these errors were encountered: