Skip to content

Commit

Permalink
[Filestore] shards should be marked as system (#2775)
Browse files Browse the repository at this point in the history
  • Loading branch information
SvartMetal authored Dec 30, 2024
1 parent 7553757 commit 8f5d1d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions cloud/filestore/libs/storage/core/model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@ TMultiShardFileStoreConfig SetupMultiShardFileStorePerformanceAndChannels(
config,
result.ShardConfigs[i],
clientProfile);
result.ShardConfigs[i].SetIsSystem(true);
}

return result;
Expand Down
6 changes: 6 additions & 0 deletions cloud/filestore/libs/storage/core/model_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,12 @@ Y_UNIT_TEST_SUITE(TModel)
for (const auto& sc: fs.ShardConfigs) {
UNIT_ASSERT_VALUES_EQUAL(5_TB / 4_KB, sc.GetBlocksCount());
}

// shards (but not main tablet) should have 'IsSystem' flag
UNIT_ASSERT(!fs.MainFileSystemConfig.GetIsSystem());
for (const auto& sc: fs.ShardConfigs) {
UNIT_ASSERT(sc.GetIsSystem());
}
}

Y_UNIT_TEST_F(ShouldCreateExplicitNumberOfShards, TConfigs)
Expand Down

0 comments on commit 8f5d1d0

Please sign in to comment.