diff --git a/src/ray/gcs/store_client/redis_store_client.cc b/src/ray/gcs/store_client/redis_store_client.cc index 4db206988..0216b92a6 100644 --- a/src/ray/gcs/store_client/redis_store_client.cc +++ b/src/ray/gcs/store_client/redis_store_client.cc @@ -104,7 +104,8 @@ Status RedisStoreClient::AsyncDelete(const std::string &table_name, } std::string redis_key = GenRedisKey(table_name, key); - std::vector args = {"DEL", redis_key}; + // We always replace `DEL` with `UNLINK`. + std::vector args = {"UNLINK", redis_key}; auto shard_context = redis_client_->GetShardContext(redis_key); return shard_context->RunArgvAsync(args, delete_callback); @@ -218,10 +219,11 @@ Status RedisStoreClient::DoPut(const std::string &key, const std::string &data, Status RedisStoreClient::DeleteByKeys(const std::vector &keys, const StatusCallback &callback) { - // The `DEL` command for each shard. + // Delete for each shard. + // We always replace `DEL` with `UNLINK`. int total_count = 0; auto del_commands_by_shards = - GenCommandsByShards(redis_client_, "DEL", keys, &total_count); + GenCommandsByShards(redis_client_, "UNLINK", keys, &total_count); auto finished_count = std::make_shared(0);