Skip to content

Commit

Permalink
FEATURE: Add mset API.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhm0311 committed Aug 16, 2024
1 parent 2286424 commit 48147c6
Show file tree
Hide file tree
Showing 13 changed files with 609 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ tests/memrm
tests/memslap
tests/memstat
tests/sasl
tests/storage
unittests/unittests
devtools/*
!devtools/maketags.sh
1 change: 1 addition & 0 deletions libmemcached/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
#define MEMCACHED_SERVER_FAILURE_RETRY_TIMEOUT 1

#define MAX_SERVERS_FOR_MULTI_KEY_OPERATION 1000
#define MAX_KEYS_FOR_MULTI_KEY_OPERATION 1000

enum memcached_server_distribution_t {
MEMCACHED_DISTRIBUTION_MODULA,
Expand Down
6 changes: 5 additions & 1 deletion libmemcached/libmemcached_probes.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
*
* Libmemcached library
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
Expand Down Expand Up @@ -111,6 +111,10 @@
#define LIBMEMCACHED_MEMCACHED_SET_END_ENABLED() (0)
#define LIBMEMCACHED_MEMCACHED_SET_START()
#define LIBMEMCACHED_MEMCACHED_SET_START_ENABLED() (0)
#define LIBMEMCACHED_MEMCACHED_MSET_END()
#define LIBMEMCACHED_MEMCACHED_MSET_END_ENABLED() (0)
#define LIBMEMCACHED_MEMCACHED_MSET_START()
#define LIBMEMCACHED_MEMCACHED_MSET_START_ENABLED() (0)

#endif

Expand Down
1 change: 1 addition & 0 deletions libmemcached/memcached.cc
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ static inline bool _memcached_init(memcached_st *self)
self->configure.filename= NULL;

self->flags.piped= false;
self->flags.bulked= false;
#ifdef LIBMEMCACHED_WITH_ZK_INTEGRATION
self->server_manager= NULL;
self->logfile= NULL;
Expand Down
1 change: 1 addition & 0 deletions libmemcached/memcached.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ struct memcached_st {
bool no_block:1; // Don't block
bool no_reply:1;
bool piped:1;
bool bulked:1;
bool randomize_replica_read:1;
bool support_cas:1;
bool tcp_nodelay:1;
Expand Down
2 changes: 2 additions & 0 deletions libmemcached/server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ static inline void _server_init(memcached_server_st *self, memcached_st *root,
self->minor_version= UINT8_MAX;
self->micro_version= UINT8_MAX;
self->is_enterprise= false;
self->send_failed= false;
self->type= type;
self->error_messages= NULL;
self->read_ptr= self->read_buffer;
Expand Down Expand Up @@ -99,6 +100,7 @@ static inline void _server_init(memcached_server_st *self, memcached_st *root,
/* self->switchover_sidx; */
/* self->switchover_peer; */
self->next= NULL; /* next server pointer */
self->switchover_state= MEMCACHED_SUCCESS;
#endif
}

Expand Down
4 changes: 3 additions & 1 deletion libmemcached/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ struct memcached_server_st {
uint8_t major_version; // Default definition of UINT8_MAX means that it has not been set.
uint8_t minor_version; // ditto
uint8_t micro_version; // ditto
bool is_enterprise;
bool is_enterprise;
bool send_failed;
memcached_connection_t type;
char *read_ptr;
size_t read_buffer_length;
Expand All @@ -106,6 +107,7 @@ struct memcached_server_st {
int32_t switchover_sidx; /* slave index for switchover */
char switchover_peer[128]; /* FIXME: constant macro must be defined */
struct memcached_server_st *next;
memcached_return_t switchover_state;
#endif
memcached_st *root;
uint64_t limit_maxbytes;
Expand Down
Loading

0 comments on commit 48147c6

Please sign in to comment.