TSG-5746 使用hos存储非结构化文件
修复缓存代码编译问题 缓存功能适配hos
This commit is contained in:
8
cache/src/tango_cache_redis.cpp
vendored
8
cache/src/tango_cache_redis.cpp
vendored
@@ -162,15 +162,15 @@ static void redis_hget_command_cb(struct redisClusterAsyncContext *ac, void *vre
|
||||
switch(ctx->get.state)
|
||||
{
|
||||
case GET_STATE_REDIS_META:
|
||||
ctx->get.result.location = (strcmp(reply->element[1]->str, "redis"))?OBJECT_IN_MINIO:OBJECT_IN_REDIS;
|
||||
ctx->get.result.location = (strcmp(reply->element[1]->str, "redis"))?OBJECT_IN_HOS:OBJECT_IN_REDIS;
|
||||
break;
|
||||
case GET_STATE_REDIS_ALL:
|
||||
ctx->get.result.location = OBJECT_IN_REDIS;
|
||||
break;
|
||||
|
||||
case GET_STATE_REDIS_TRY:
|
||||
ctx->get.result.location = (strcmp(reply->element[1]->str, "redis"))?OBJECT_IN_MINIO:OBJECT_IN_REDIS;
|
||||
if(ctx->get.result.location == OBJECT_IN_MINIO)
|
||||
ctx->get.result.location = (strcmp(reply->element[1]->str, "redis"))?OBJECT_IN_HOS:OBJECT_IN_REDIS;
|
||||
if(ctx->get.result.location == OBJECT_IN_HOS)
|
||||
{
|
||||
ctx->get.redis_redirect_minio_cb(ctx);
|
||||
return;
|
||||
@@ -189,7 +189,7 @@ static void redis_hget_command_cb(struct redisClusterAsyncContext *ac, void *vre
|
||||
tango_cache_ctx_destroy(ctx);
|
||||
break;
|
||||
case PARSE_JSON_RET_TIMEOUT:
|
||||
if(ctx->get.state == GET_STATE_DELETE && ctx->get.result.location==OBJECT_IN_MINIO)
|
||||
if(ctx->get.state == GET_STATE_DELETE && ctx->get.result.location==OBJECT_IN_HOS)
|
||||
{
|
||||
ctx->get.state = GET_STATE_END;
|
||||
cache_delete_minio_object(ctx);
|
||||
|
||||
Reference in New Issue
Block a user