Rename redisOpArray to serverOpArray (#157)

A task of #144

Signed-off-by: 0del <bany.y0599@gmail.com>
This commit is contained in:
0del 2024-04-03 11:26:20 +07:00 committed by GitHub
parent cbbaf69d1d
commit 730174445b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 10 deletions

View File

@ -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.

View File

@ -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);