Skip to content

Commit

Permalink
INTERNAL: Move io reset from where calls memcached_vdo() to where fai…
Browse files Browse the repository at this point in the history
…ls inside of memcached_vdo() naver#167
  • Loading branch information
uhm0311 committed Apr 22, 2022
1 parent ed30ca2 commit d822906
Show file tree
Hide file tree
Showing 11 changed files with 569 additions and 0 deletions.
11 changes: 11 additions & 0 deletions libmemcached/auto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@ static memcached_return_t text_incr_decr(memcached_st *ptr,
#endif
/* Send command header */
memcached_return_t rc= memcached_vdo(instance, vector, 7, true);
#ifdef MEMCACHED_VDO_ERROR_HANDLING
if (ptr->flags.no_reply or rc != MEMCACHED_SUCCESS)
#else
if (ptr->flags.no_reply or memcached_failed(rc))
#endif
{
return rc;
}
Expand Down Expand Up @@ -214,6 +218,12 @@ static memcached_return_t binary_incr_decr(memcached_st *ptr, uint8_t cmd,
#ifdef ENABLE_REPLICATION
do_action:
#endif
#ifdef MEMCACHED_VDO_ERROR_HANDLING
memcached_return_t rc= memcached_vdo(instance, vector, 3, true);
if (no_reply or rc != MEMCACHED_SUCCESS) {
return rc;
}
#else
memcached_return_t rc;
if (memcached_failed(rc= memcached_vdo(instance, vector, 3, true)))
{
Expand All @@ -223,6 +233,7 @@ static memcached_return_t binary_incr_decr(memcached_st *ptr, uint8_t cmd,

if (no_reply)
return MEMCACHED_SUCCESS;
#endif

rc= memcached_response(instance, (char*)value, sizeof(*value), NULL);
#ifdef ENABLE_REPLICATION
Expand Down
Loading

0 comments on commit d822906

Please sign in to comment.