mirror of
http://github.com/valkey-io/valkey
synced 2024-11-21 16:46:15 +00:00
rename redisOp to serverOp (#181)
https://github.com/valkey-io/valkey/issues/144 Signed-off-by: 0del <bany.y0599@gmail.com>
This commit is contained in:
parent
8b3ab8f74f
commit
edee864b34
@ -3118,7 +3118,7 @@ void resetErrorTableStats(void) {
|
||||
/* ========================== Redis OP Array API ============================ */
|
||||
|
||||
int serverOpArrayAppend(serverOpArray *oa, int dbid, robj **argv, int argc, int target) {
|
||||
redisOp *op;
|
||||
serverOp *op;
|
||||
int prev_capacity = oa->capacity;
|
||||
|
||||
if (oa->numops == 0) {
|
||||
@ -3128,7 +3128,7 @@ int serverOpArrayAppend(serverOpArray *oa, int dbid, robj **argv, int argc, int
|
||||
}
|
||||
|
||||
if (prev_capacity != oa->capacity)
|
||||
oa->ops = zrealloc(oa->ops,sizeof(redisOp)*oa->capacity);
|
||||
oa->ops = zrealloc(oa->ops,sizeof(serverOp)*oa->capacity);
|
||||
op = oa->ops+oa->numops;
|
||||
op->dbid = dbid;
|
||||
op->argv = argv;
|
||||
@ -3141,7 +3141,7 @@ int serverOpArrayAppend(serverOpArray *oa, int dbid, robj **argv, int argc, int
|
||||
void serverOpArrayFree(serverOpArray *oa) {
|
||||
while(oa->numops) {
|
||||
int j;
|
||||
redisOp *op;
|
||||
serverOp *op;
|
||||
|
||||
oa->numops--;
|
||||
op = oa->ops+oa->numops;
|
||||
@ -3385,7 +3385,7 @@ static void propagatePendingCommands(void) {
|
||||
return;
|
||||
|
||||
int j;
|
||||
redisOp *rop;
|
||||
serverOp *rop;
|
||||
|
||||
/* If we got here it means we have finished an execution-unit.
|
||||
* If that unit has caused propagation of multiple commands, they
|
||||
|
@ -1371,16 +1371,16 @@ typedef struct clientBufferLimitsConfig {
|
||||
|
||||
extern clientBufferLimitsConfig clientBufferLimitsDefaults[CLIENT_TYPE_OBUF_COUNT];
|
||||
|
||||
/* The redisOp structure defines a Redis Operation, that is an instance of
|
||||
/* The serverOp structure defines a Redis Operation, that is an instance of
|
||||
* a command with an argument vector, database ID, propagation target
|
||||
* (PROPAGATE_*), and command pointer.
|
||||
*
|
||||
* Currently only used to additionally propagate more commands to AOF/Replication
|
||||
* after the propagation of the executed command. */
|
||||
typedef struct redisOp {
|
||||
typedef struct serverOp {
|
||||
robj **argv;
|
||||
int argc, dbid, target;
|
||||
} redisOp;
|
||||
} serverOp;
|
||||
|
||||
/* Defines an array of Redis operations. There is an API to add to this
|
||||
* structure in an easy way.
|
||||
@ -1389,7 +1389,7 @@ typedef struct redisOp {
|
||||
* void serverOpArrayFree(serverOpArray *oa);
|
||||
*/
|
||||
typedef struct serverOpArray {
|
||||
redisOp *ops;
|
||||
serverOp *ops;
|
||||
int numops;
|
||||
int capacity;
|
||||
} serverOpArray;
|
||||
|
Loading…
Reference in New Issue
Block a user