Skip to content

Commit

Permalink
[bug](Cloud) Use value capture for done closure when alter vault sync
Browse files Browse the repository at this point in the history
  • Loading branch information
ByteYue authored May 22, 2024
1 parent 806e241 commit a33d2ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion be/src/cloud/cloud_internal_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void CloudInternalServiceImpl::alter_vault_sync(google::protobuf::RpcController*
// If the vaults containing hdfs vault then it would try to create hdfs connection using jni
// which would acuiqre one thread local jniEnv. But bthread context can't guarantee that the brpc
// worker thread wouldn't do bthread switch between worker threads.
bool ret = _heavy_work_pool.try_offer([&]() {
bool ret = _heavy_work_pool.try_offer([this, done]() {
brpc::ClosureGuard closure_guard(done);
_engine.sync_storage_vault();
});
Expand Down

0 comments on commit a33d2ee

Please sign in to comment.