Skip to content

Commit 566fc56

Browse files
committed
bugfix in trans buffer
1 parent 101ea31 commit 566fc56

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

ucm/store/cache/cc/trans_buffer.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,9 @@ size_t TransBuffer::FindAt(size_t iBucket, const Detail::BlockId& blockId, size_
374374
strategy_->NodeUnlock(iNode);
375375
break;
376376
}
377+
auto next = meta->next;
377378
strategy_->NodeUnlock(iNode);
379+
iNode = next;
378380
}
379381
return iNode;
380382
}

ucm/store/cache/cc/trans_manager.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,11 @@ class TransManager : public Detail::TaskWrapper<TransTask, Detail::TaskHandle> {
5858
const auto num = t->desc.size();
5959
const auto size = shardSize_ * num;
6060
const auto tp = w->startTp;
61+
UC_DEBUG("Dispatch one cache task({},{},{},{}).", id, brief, num, size);
6162
w->SetEpilog([id, brief = std::move(brief), num, size, tp] {
6263
auto cost = NowTime::Now() - tp;
63-
UC_DEBUG("Task({},{},{},{}) finished, cost {:06f}s, bw={:06f}GB/s.", id, brief, num,
64-
size, cost, size / cost / 1e9);
64+
UC_DEBUG("Cache task({},{},{},{}) finished, cost {:06f}s, bw={:06f}GB/s.", id, brief,
65+
num, size, cost, size / cost / 1e9);
6566
});
6667
if (t->type == TransTask::Type::LOAD) {
6768
loadQ_.Submit(t, w);

ucm/store/posix/cc/trans_manager.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,11 @@ class TransManager : public Detail::TaskWrapper<TransTask, Detail::TaskHandle> {
5050
const auto num = t->desc.size();
5151
const auto size = shardSize_ * num;
5252
const auto tp = w->startTp;
53+
UC_DEBUG("Dispatch one posix task({},{},{},{}).", id, brief, num, size);
5354
w->SetEpilog([id, brief = std::move(brief), num, size, tp] {
5455
auto cost = NowTime::Now() - tp;
55-
UC_DEBUG("Task({},{},{},{}) finished, cost {:06f}s, bw={:06f}GB/s.", id, brief, num,
56-
size, cost, size / cost / 1e9);
56+
UC_DEBUG("Posix task({},{},{},{}) finished, cost {:06f}s, bw={:06f}GB/s.", id, brief,
57+
num, size, cost, size / cost / 1e9);
5758
});
5859
queue_.Push(t, w);
5960
}

ucm/store/test/e2e/cache_on_posix_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ def __init__(
6363
cache_config["block_size"] = chunk_block_size
6464
cache_config["buffer_size"] = chunk_block_size * 2048
6565
cache_config["share_buffer_enable"] = True
66+
cache_config["waiting_queue_depth"] = 16
67+
cache_config["running_queue_depth"] = 1024
6668
cache_config["transfer_timeout_ms"] = 30000
6769
self.cache = UcmCacheStore(cache_config)
6870

0 commit comments

Comments
 (0)