From 1d46e5f3647e1bebaa5142247c7d6601b4010821 Mon Sep 17 00:00:00 2001 From: pengxuanzheng Date: Mon, 27 Sep 2021 15:53:52 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(TSG-7946):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8Dposition=E8=AF=AF=E5=A2=9E=E5=8A=A0=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hos_client.cpp | 3 ++- src/hos_common.h | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hos_client.cpp b/src/hos_client.cpp index 3029af92..b4ec4113 100644 --- a/src/hos_client.cpp +++ b/src/hos_client.cpp @@ -232,7 +232,6 @@ static void hos_client_create() g_hos_handle.buckets = outcome.GetResult().GetBuckets(); g_hos_handle.count++; - g_hos_handle.executor = std::dynamic_pointer_cast(config.executor); g_hos_handle.task_num = (size_t *)calloc(hos_conf->thread_num, sizeof(size_t)); g_hos_handle.task_context = (size_t *)calloc(hos_conf->thread_num, sizeof(size_t)); @@ -510,6 +509,8 @@ static int hos_putobject_async(Aws::S3::Model::PutObjectRequest& request, size_t } } + atomic_sub(&((*fd)->position), 1); + return HOS_SEND_FAILED; } diff --git a/src/hos_common.h b/src/hos_common.h index 303fa626..fdc7c654 100644 --- a/src/hos_common.h +++ b/src/hos_common.h @@ -93,7 +93,6 @@ typedef struct hos_client_handle_s Aws::S3::S3ClientMock *S3Client; #endif Aws::Vector buckets; - std::shared_ptr executor; size_t count; /* 记录了有多少个对象在使用hos */ hos_config_t hos_config; hos_func_thread_t hos_func;