Skip to content

Commit 242e304

Browse files
committed
merge fixes
2 parents 6af5e88 + 5b3fbf2 commit 242e304

File tree

74 files changed

+1906
-1135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+1906
-1135
lines changed

.github/workflows/build-cachelib-docker.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: build-cachelib-docker
22
on:
33
push:
44
pull_request:
5+
workflow_dispatch:
56

67
jobs:
78
build-cachelib-docker:

cachelib/allocator/CCacheAllocator.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ CCacheAllocator::CCacheAllocator(MemoryAllocator& allocator, PoolId poolId)
3030
CCacheAllocator::CCacheAllocator(MemoryAllocator& allocator,
3131
PoolId poolId,
3232
const SerializationType& object)
33-
: CCacheAllocatorBase(*object.ccMetadata_ref()),
33+
: CCacheAllocatorBase(*object.ccMetadata()),
3434
allocator_(allocator),
3535
poolId_(poolId),
3636
currentChunksIndex_(0) {
3737
auto& currentChunks = chunks_[currentChunksIndex_];
38-
for (auto chunk : *object.chunks_ref()) {
38+
for (auto chunk : *object.chunks()) {
3939
currentChunks.push_back(allocator_.unCompress(CompressedPtr(chunk)));
4040
}
4141
}
@@ -93,11 +93,11 @@ size_t CCacheAllocator::resize() {
9393

9494
CCacheAllocator::SerializationType CCacheAllocator::saveState() {
9595
CCacheAllocator::SerializationType object;
96-
*object.ccMetadata_ref() = ccType_.saveState();
96+
*object.ccMetadata() = ccType_.saveState();
9797

9898
std::lock_guard<std::mutex> guard(resizeLock_);
9999
for (auto chunk : getCurrentChunks()) {
100-
object.chunks_ref()->push_back(allocator_.compress(chunk).saveState());
100+
object.chunks()->push_back(allocator_.compress(chunk).saveState());
101101
}
102102
return object;
103103
}

cachelib/allocator/CCacheManager.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ CCacheManager::CCacheManager(const SerializationType& object,
2424
: memoryAllocator_(memoryAllocator) {
2525
std::lock_guard<std::mutex> guard(lock_);
2626

27-
for (const auto& allocator : *object.allocators_ref()) {
27+
for (const auto& allocator : *object.allocators()) {
2828
auto id = memoryAllocator_.getPoolId(allocator.first);
2929
allocators_.emplace(
3030
std::piecewise_construct,
@@ -81,8 +81,7 @@ CCacheManager::SerializationType CCacheManager::saveState() {
8181

8282
SerializationType object;
8383
for (auto& allocator : allocators_) {
84-
object.allocators_ref()->emplace(allocator.first,
85-
allocator.second.saveState());
84+
object.allocators()->emplace(allocator.first, allocator.second.saveState());
8685
}
8786
return object;
8887
}

0 commit comments

Comments
 (0)