Skip to content

Commit 15f9a59

Browse files
authored
Merge pull request #18179 from siyuanfoundation/lazyfs
robustness: Separate compaction and LazyFS test scenario for cluster size 1
2 parents f01f23d + aaa6e9e commit 15f9a59

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

tests/robustness/scenarios.go

+11-2
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,17 @@ func exploratoryScenarios(_ *testing.T) []testScenario {
106106
clusterOfSize1Options = append(clusterOfSize1Options, e2e.WithClusterSize(1))
107107
// Add LazyFS only for traffic with lower QPS as it uses a lot of CPU lowering minimal QPS.
108108
if enableLazyFS && tp.Profile.MinimalQPS <= 100 {
109-
clusterOfSize1Options = append(clusterOfSize1Options, e2e.WithLazyFSEnabled(true))
110-
name = filepath.Join(name, "LazyFS")
109+
// Set CompactionBatchLimit to default when LazyFS is enabled, because frequent compaction uses a lot of CPU too.
110+
lazyFSOptions := append(clusterOfSize1Options, e2e.WithLazyFSEnabled(true), e2e.WithCompactionBatchLimit(1000))
111+
scenarios = append(scenarios, testScenario{
112+
name: filepath.Join(name, "LazyFS"),
113+
traffic: tp.Traffic,
114+
profile: tp.Profile,
115+
cluster: *e2e.NewConfig(lazyFSOptions...),
116+
})
117+
// Smaller CompactionBatchLimit without LazyFS to test Compact.
118+
clusterOfSize1Options = append(clusterOfSize1Options, options.WithCompactionBatchLimit(10, 100))
119+
name = filepath.Join(name, "Compact")
111120
}
112121
scenarios = append(scenarios, testScenario{
113122
name: name,

0 commit comments

Comments
 (0)