Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc4b2ea6

Browse files
FixVEMB reply handling inRedisCluster
1 parent0b4b4ed commitc4b2ea6

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

‎cluster_library.c‎

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2506,6 +2506,33 @@ cluster_xclaim_resp(INTERNAL_FUNCTION_PARAMETERS, redisCluster *c, void *ctx) {
25062506

25072507
}
25082508

2509+
PHP_REDIS_APIvoid
2510+
cluster_vemb_resp(INTERNAL_FUNCTION_PARAMETERS,redisCluster*c,void*ctx) {
2511+
zvalz_ret;
2512+
2513+
ZVAL_FALSE(&z_ret);
2514+
2515+
if (c->reply_type!=TYPE_MULTIBULK||c->reply_len<0)
2516+
gotofail;
2517+
2518+
array_init(&z_ret);
2519+
2520+
if (redis_read_vemb_response(c->cmd_sock,&z_ret,c->reply_len)!=SUCCESS)
2521+
gotofail;
2522+
2523+
if (CLUSTER_IS_ATOMIC(c)) {
2524+
RETURN_ZVAL(&z_ret,0,1);
2525+
}else {
2526+
add_next_index_zval(&c->multi_resp,&z_ret);
2527+
}
2528+
2529+
return;
2530+
2531+
fail:
2532+
zval_dtor(&z_ret);
2533+
CLUSTER_RETURN_FALSE(c);
2534+
}
2535+
25092536
PHP_REDIS_APIvoid
25102537
cluster_vinfo_resp(INTERNAL_FUNCTION_PARAMETERS,redisCluster*c,void*ctx) {
25112538
zvalz_ret;
@@ -2554,7 +2581,6 @@ cluster_vgetattr_resp(INTERNAL_FUNCTION_PARAMETERS, redisCluster *c, void *ctx)
25542581
}
25552582
}
25562583

2557-
25582584
PHP_REDIS_APIvoid
25592585
cluster_vlinks_resp(INTERNAL_FUNCTION_PARAMETERS,redisCluster*c,void*ctx) {
25602586
zvalz_ret;

‎cluster_library.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,8 @@ PHP_REDIS_API void cluster_sub_resp(INTERNAL_FUNCTION_PARAMETERS, redisCluster *
448448
void*ctx);
449449
PHP_REDIS_APIvoidcluster_unsub_resp(INTERNAL_FUNCTION_PARAMETERS,redisCluster*c,
450450
void*ctx);
451+
PHP_REDIS_APIvoidcluster_vemb_resp(INTERNAL_FUNCTION_PARAMETERS,redisCluster*c,
452+
void*ctx);
451453
PHP_REDIS_APIvoidcluster_vinfo_resp(INTERNAL_FUNCTION_PARAMETERS,redisCluster*c,
452454
void*ctx);
453455
PHP_REDIS_APIvoidcluster_vlinks_resp(INTERNAL_FUNCTION_PARAMETERS,redisCluster*c,

‎redis_cluster.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3201,7 +3201,7 @@ PHP_METHOD(RedisCluster, vinfo) {
32013201
}
32023202

32033203
PHP_METHOD(RedisCluster,vemb) {
3204-
CLUSTER_PROCESS_CMD(vemb,cluster_variant_resp,1);
3204+
CLUSTER_PROCESS_CMD(vemb,cluster_vemb_resp,1);
32053205
}
32063206

32073207
PHP_METHOD(RedisCluster,vrandmember) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp