Skip to content
Closed
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
51d9fe8
feat(store): tenant-first module foundation
CAICAIIs Sep 1, 2026
46eb2c8
feat(store): tenant-first object-level locking in MasterService
CAICAIIs Sep 1, 2026
ea35352
refactor(store): complete tenant-first migration
CAICAIIs Sep 1, 2026
0efd9ac
style(store): apply clang-format-20 to changed lines
Sep 3, 2026
f557fd2
refactor(store): complete shard-era accessor rename and stale comment…
CAICAIIs Sep 3, 2026
f6bd9fc
fix(store): restore shard-concept error strings missed by accessor re…
CAICAIIs Sep 3, 2026
36a8fb2
style(store): clang-format the shard-era accessor rename lines
Sep 3, 2026
92fbba4
fix(store): apply #3822 review feedback (atomic include; route/member…
CAICAIIs Sep 3, 2026
a84e2c3
ci: trigger re-run on flaky test-wheel-ubuntu (22.04) failure
CAICAIIs Sep 4, 2026
ce1f5b0
ci: trigger CI re-run
CAICAIIs Sep 7, 2026
46c4fcc
Merge remote-tracking branch 'upstream/main' into tenant-first-object…
CAICAIIs Sep 7, 2026
635f445
Merge remote-tracking branch 'upstream/main' into tenant-first-object…
CAICAIIs Sep 7, 2026
6c9dff8
Merge remote-tracking branch 'upstream/main' into tenant-first-object…
CAICAIIs Sep 7, 2026
b4c3486
fix(store): apply #3822 review feedback (lifecycle protocol + API cle…
CAICAIIs Sep 7, 2026
02ccfda
refactor(store): extract ObjectReplicaList and tighten ObjectMetadata…
CAICAIIs Sep 8, 2026
16c2a89
refactor(store): make ObjectMetadata's lock and lease private
CAICAIIs Sep 8, 2026
44a0f2b
refactor(store): inject the snapshot-barrier test gate instead of For…
CAICAIIs Sep 8, 2026
ed0d62b
refactor(store): prune dead seams from the tenant module classes
CAICAIIs Sep 8, 2026
8a027cf
refactor(store): enforce wired-at-construction metadata on ObjectEntry
CAICAIIs Sep 8, 2026
0ba03aa
refactor(store): split ObjectReplicaList into its own header and drop…
CAICAIIs Sep 8, 2026
b3bfaf5
refactor(store): make the metadata envelope the single source of obje…
CAICAIIs Sep 8, 2026
c50d3b1
refactor(store): introduce MetadataCatalog as the metadata boundary
CAICAIIs Sep 8, 2026
1b6d61c
refactor(store): privatize entry locking, extract GroupIndex, add rou…
CAICAIIs Sep 8, 2026
6e9b16f
docs(store): trim migration narrative from tenant module headers
CAICAIIs Sep 8, 2026
5dae3b9
refactor(store): move GroupIndex out of ObjectIndex into TenantCatalog
CAICAIIs Sep 8, 2026
be34d80
Merge remote-tracking branch 'upstream/main' into tenant-first-object…
CAICAIIs Sep 8, 2026
a053a0d
refactor(store): move tenant-domain functions into TenantCatalog and …
CAICAIIs Sep 8, 2026
a909a0b
docs(store): fix stale lease comment and prune unused includes
CAICAIIs Sep 9, 2026
79af643
refactor(store): finish the shard-naming cleanup in tests
CAICAIIs Sep 9, 2026
20c4196
fix(store): close the remaining catalog lifecycle gaps
CAICAIIs Sep 9, 2026
b41de19
fix(store): gate promotion/DR entry-state helpers on the entry mutex
CAICAIIs Sep 9, 2026
e0ba994
test(store): drop dead legacy-bucket placement from group and cap tests
CAICAIIs Sep 9, 2026
35e39eb
fix(store): read grouped state under the entry lock and drop orphan c…
CAICAIIs Sep 9, 2026
c287175
refactor(store): replace the default-tenant Visit filter with Lookup
CAICAIIs Sep 9, 2026
7960b55
refactor(store): fold TenantCatalogAccessorRW into TenantCatalog
CAICAIIs Sep 9, 2026
4d560ee
docs(store): make the writer-field comments self-contained
CAICAIIs Sep 9, 2026
5965623
Merge remote-tracking branch 'upstream/main' into tenant-first-object…
CAICAIIs Sep 9, 2026
00390e6
Merge remote-tracking branch 'upstream/main' into tenant-first-object…
CAICAIIs Sep 10, 2026
ba973f9
bench(store): add metadata scan cost benchmark
CAICAIIs Sep 10, 2026
f989d48
style(store): fix clang-format drift from the upstream merge and
CAICAIIs Sep 10, 2026
6d14a59
perf(store): shard GroupIndex locks by group id
CAICAIIs Sep 10, 2026
16e24f5
fix(store): address review feedback on tenant metadata surfaces
CAICAIIs Sep 10, 2026
72881ab
style(store): drop duplicate tenant-handle references in durable fina…
CAICAIIs Sep 10, 2026
eb5de78
refactor(store): keep one entry-based EraseMetadata overload
CAICAIIs Sep 10, 2026
33f7fda
refactor(store): rename the tenant namespace to metadata
CAICAIIs Sep 10, 2026
4cd84f4
fix(store): enforce entry-lock discipline across teardown and read paths
CAICAIIs Sep 10, 2026
48cb0a7
perf(store): index promotion candidates for sparse retry enumeration
CAICAIIs Sep 10, 2026
6773cbe
style(store): fix formatting under the CI clang-format
CAICAIIs Sep 10, 2026
68b8b63
refactor(store): unify tenant catalog references on one name
CAICAIIs Sep 11, 2026
115e7b8
style(store): purge the last shard-era naming leftovers
CAICAIIs Sep 11, 2026
c16ac8e
refactor(store): reach the group lease test hook through TenantCatalog
CAICAIIs Sep 11, 2026
3f53013
refactor(store): close the TenantCatalog boundary
CAICAIIs Sep 11, 2026
a022d72
fix(store): close the entry-teardown review gaps
CAICAIIs Sep 11, 2026
78df7e5
perf(store): transparent lookup + initial reserve for tenant object i…
CAICAIIs Sep 11, 2026
68fafa5
style(store): rewrap the lock-order comment to the column limit
CAICAIIs Sep 11, 2026
7bcc6c4
Revert "perf(store): transparent lookup + initial reserve for tenant …
CAICAIIs Sep 11, 2026
20f168b
test(store): tenant RemoveAll must not block other tenants
CAICAIIs Sep 11, 2026
18390d5
style(store): fix formatting and a typos finding in the teardown foll…
CAICAIIs Sep 12, 2026
1e6df91
Merge upstream/main into tenant-first object-locking line
CAICAIIs Sep 12, 2026
58996ff
perf(store): share the allocator registry snapshot across requests
CAICAIIs Sep 12, 2026
1c1835d
style(store): format the snapshot follow-up and adapt snapshot tests
CAICAIIs Sep 13, 2026
ae1c94a
Merge upstream/main into tenant-first object locking
CAICAIIs Sep 15, 2026
12e7f2b
test(store): restore cleared-suppression coverage and clean up test s…
CAICAIIs Sep 15, 2026
a665e41
refactor(store): capture the tenant factory's id by value
CAICAIIs Sep 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 38 additions & 31 deletions mooncake-store/benchmarks/batch_evict_bench.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,42 +169,49 @@ class BatchEvictBench {
const auto base_expiration = now - std::chrono::hours(1);
size_t ordinal = 0;

for (size_t shard_idx = 0; shard_idx < MasterService::kNumShards;
++shard_idx) {
MasterService::MetadataShardAccessorRW shard(&service, shard_idx);
for (auto& [tenant_id, tenant_state] : shard->tenants) {
// Objects live in the default tenant's per-tenant route. Walk it via
// the ownership registry; per-object access is under the metadata lock.
service.tenant_directory_.Visit(
[&](const TenantId& tenant_id,
const std::shared_ptr<MasterService::TenantState>& handle) {
if (tenant_id != TenantId::Default()) {
continue;
return;
}
for (auto& [key, metadata] : tenant_state.metadata) {
{
SpinLocker locker(&metadata.lock);
metadata.lease_->SetDeadline(
base_expiration +
std::chrono::nanoseconds(ordinal++));
}

++stats.object_count;
if (!metadata.IsLeaseExpired(now)) {
++stats.unexpired_leases;
}
for (const auto& replica : metadata.GetAllReplicas()) {
if (replica.is_memory_replica()) {
if (replica.is_completed()) {
++stats.completed_memory_replicas;
auto& tenant_state = *handle;
tenant_state.VisitObjects(
[&](const std::shared_ptr<mooncake::tenant::ObjectEntry>&
entry) {
if (!entry->has_metadata()) {
return;
}
auto& metadata = *entry->metadata();
{
SpinLocker locker(&metadata.lock);
metadata.lease_->SetDeadline(
base_expiration +
std::chrono::nanoseconds(ordinal++));
}
Comment thread
CAICAIIs marked this conversation as resolved.
Resolved

++stats.object_count;
if (!metadata.IsLeaseExpired(now)) {
++stats.unexpired_leases;
}
for (const auto& replica : metadata.GetAllReplicas()) {
if (replica.is_memory_replica()) {
if (replica.is_completed()) {
++stats.completed_memory_replicas;
} else {
++stats.incomplete_replicas;
}
if (replica.get_refcnt() != 0) {
++stats.busy_memory_replicas;
}
} else {
++stats.incomplete_replicas;
++stats.non_memory_replicas;
}
if (replica.get_refcnt() != 0) {
++stats.busy_memory_replicas;
}
} else {
++stats.non_memory_replicas;
}
}
}
}
}
});
});

return stats;
}
Expand Down
2 changes: 1 addition & 1 deletion mooncake-store/include/kv_event/kv_event_publisher.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <vector>

#include "kv_event/kv_event_config.h"
#include "tenant_id.h"
#include "tenant/tenant_id.h"

namespace mooncake {

Expand Down
2 changes: 1 addition & 1 deletion mooncake-store/include/local_ssd/manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "local_ssd/persisted_state.h"
#include "mutex.h"
#include "tenant_id.h"
#include "tenant/tenant_id.h"
#include "types.h"

namespace mooncake {
Expand Down
Loading
Loading