mirror of
https://github.com/vale981/ray
synced 2025-03-07 02:51:39 -05: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:
parent
6531eed2d0
commit
befbf78048
1 changed files with 4 additions and 0 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Reference in a new issue