mirror of
https://github.com/wassname/ray.git
synced 2026-07-02 19:05:42 +08:00
Delete empty pubsub keys (#3146)
We found that there are large amount of pub-sub keys with no content in it (This case is worse when wait-id is used in the key name.). This logic of deleting empty pub-sub keys from GCS was in legacy ray but not in raylet.
This commit is contained in:
committed by
Robert Nishihara
parent
6531eed2d0
commit
befbf78048
@@ -544,6 +544,10 @@ int TableCancelNotifications_RedisCommand(RedisModuleCtx *ctx, RedisModuleString
|
||||
if (RedisModule_KeyType(notification_key) != REDISMODULE_KEYTYPE_EMPTY) {
|
||||
RAY_CHECK(RedisModule_ZsetRem(notification_key, client_channel, NULL) ==
|
||||
REDISMODULE_OK);
|
||||
size_t size = RedisModule_ValueLength(notification_key);
|
||||
if (size == 0) {
|
||||
CHECK_ERROR(RedisModule_DeleteKey(notification_key), "Unable to delete zset key.");
|
||||
}
|
||||
}
|
||||
|
||||
RedisModule_ReplyWithSimpleString(ctx, "OK");
|
||||
|
||||
Reference in New Issue
Block a user