Skip to content

Commit e220065

Browse files
committed
submit dump task
1 parent 0511e1e commit e220065

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

ucm/store/cache/cc/trans_manager.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#ifndef UNIFIEDCACHE_CACHE_STORE_CC_TRANS_MANAGER_H
2525
#define UNIFIEDCACHE_CACHE_STORE_CC_TRANS_MANAGER_H
2626

27+
#include "dump_queue.h"
2728
#include "load_queue.h"
2829
#include "logger/logger.h"
2930
#include "template/task_wrapper.h"
@@ -35,6 +36,7 @@ class TransManager : public Detail::TaskWrapper<TransTask, Detail::TaskHandle> {
3536
size_t shardSize_;
3637
TransBuffer buffer_;
3738
LoadQueue loadQ_;
39+
DumpQueue dumpQ_;
3840

3941
public:
4042
Status Setup(const Config& config)
@@ -43,7 +45,9 @@ class TransManager : public Detail::TaskWrapper<TransTask, Detail::TaskHandle> {
4345
shardSize_ = config.shardSize;
4446
auto s = buffer_.Setup(config);
4547
if (s.Failure()) [[unlikely]] { return s; }
46-
return loadQ_.Setup(config, &failureSet_, &buffer_);
48+
s = loadQ_.Setup(config, &failureSet_, &buffer_);
49+
if (s.Failure()) [[unlikely]] { return s; }
50+
return dumpQ_.Setup(config, &failureSet_, &buffer_);
4751
}
4852

4953
protected:
@@ -61,7 +65,8 @@ class TransManager : public Detail::TaskWrapper<TransTask, Detail::TaskHandle> {
6165
});
6266
if (t->type == TransTask::Type::LOAD) {
6367
loadQ_.Submit(t, w);
64-
return;
68+
} else {
69+
dumpQ_.Submit(t, w);
6570
}
6671
}
6772
};

0 commit comments

Comments
 (0)