mirror of
http://github.com/valkey-io/valkey
synced 2024-11-21 16:46:15 +00:00
Rename redisOpArray to serverOpArray (#157)
A task of #144 Signed-off-by: 0del <bany.y0599@gmail.com>
This commit is contained in:
parent
cbbaf69d1d
commit
730174445b
@ -3117,7 +3117,7 @@ void resetErrorTableStats(void) {
|
||||
|
||||
/* ========================== Redis OP Array API ============================ */
|
||||
|
||||
int redisOpArrayAppend(redisOpArray *oa, int dbid, robj **argv, int argc, int target) {
|
||||
int serverOpArrayAppend(serverOpArray *oa, int dbid, robj **argv, int argc, int target) {
|
||||
redisOp *op;
|
||||
int prev_capacity = oa->capacity;
|
||||
|
||||
@ -3138,7 +3138,7 @@ int redisOpArrayAppend(redisOpArray *oa, int dbid, robj **argv, int argc, int ta
|
||||
return oa->numops;
|
||||
}
|
||||
|
||||
void redisOpArrayFree(redisOpArray *oa) {
|
||||
void serverOpArrayFree(serverOpArray *oa) {
|
||||
while(oa->numops) {
|
||||
int j;
|
||||
redisOp *op;
|
||||
@ -3322,7 +3322,7 @@ void alsoPropagate(int dbid, robj **argv, int argc, int target) {
|
||||
argvcopy[j] = argv[j];
|
||||
incrRefCount(argv[j]);
|
||||
}
|
||||
redisOpArrayAppend(&server.also_propagate,dbid,argvcopy,argc,target);
|
||||
serverOpArrayAppend(&server.also_propagate,dbid,argvcopy,argc,target);
|
||||
}
|
||||
|
||||
/* It is possible to call the function forceCommandPropagation() inside a
|
||||
@ -3419,7 +3419,7 @@ static void propagatePendingCommands(void) {
|
||||
propagateNow(-1,&shared.exec,1,PROPAGATE_AOF|PROPAGATE_REPL);
|
||||
}
|
||||
|
||||
redisOpArrayFree(&server.also_propagate);
|
||||
serverOpArrayFree(&server.also_propagate);
|
||||
}
|
||||
|
||||
/* Performs operations that should be performed after an execution unit ends.
|
||||
|
12
src/server.h
12
src/server.h
@ -1385,14 +1385,14 @@ typedef struct redisOp {
|
||||
/* Defines an array of Redis operations. There is an API to add to this
|
||||
* structure in an easy way.
|
||||
*
|
||||
* int redisOpArrayAppend(redisOpArray *oa, int dbid, robj **argv, int argc, int target);
|
||||
* void redisOpArrayFree(redisOpArray *oa);
|
||||
* int serverOpArrayAppend(serverOpArray *oa, int dbid, robj **argv, int argc, int target);
|
||||
* void serverOpArrayFree(serverOpArray *oa);
|
||||
*/
|
||||
typedef struct redisOpArray {
|
||||
typedef struct serverOpArray {
|
||||
redisOp *ops;
|
||||
int numops;
|
||||
int capacity;
|
||||
} redisOpArray;
|
||||
} serverOpArray;
|
||||
|
||||
/* This structure is returned by the getMemoryOverheadData() function in
|
||||
* order to return memory overhead information. */
|
||||
@ -1844,7 +1844,7 @@ struct redisServer {
|
||||
int child_info_pipe[2]; /* Pipe used to write the child_info_data. */
|
||||
int child_info_nread; /* Num of bytes of the last read from pipe */
|
||||
/* Propagation of commands in AOF / replication */
|
||||
redisOpArray also_propagate; /* Additional command to propagate. */
|
||||
serverOpArray also_propagate; /* Additional command to propagate. */
|
||||
int replication_allowed; /* Are we allowed to replicate? */
|
||||
/* Logging */
|
||||
char *logfile; /* Path of log file */
|
||||
@ -3065,7 +3065,7 @@ int incrCommandStatsOnError(struct redisCommand *cmd, int flags);
|
||||
void call(client *c, int flags);
|
||||
void alsoPropagate(int dbid, robj **argv, int argc, int target);
|
||||
void postExecutionUnitOperations(void);
|
||||
void redisOpArrayFree(redisOpArray *oa);
|
||||
void serverOpArrayFree(serverOpArray *oa);
|
||||
void forceCommandPropagation(client *c, int flags);
|
||||
void preventCommandPropagation(client *c);
|
||||
void preventCommandAOF(client *c);
|
||||
|
Loading…
Reference in New Issue
Block a user