Reduce number of buckets in ttl controller for 2k+ nodes clusters

This commit is contained in:
Marcel Zięba 2022-05-04 09:55:22 +00:00
parent 3bef1692ef
commit 47257b7613
2 changed files with 15 additions and 2 deletions

View File

@ -108,8 +108,7 @@ var (
{sizeMin: 90, sizeMax: 500, ttlSeconds: 15},
{sizeMin: 450, sizeMax: 1000, ttlSeconds: 30},
{sizeMin: 900, sizeMax: 2000, ttlSeconds: 60},
{sizeMin: 1800, sizeMax: 10000, ttlSeconds: 300},
{sizeMin: 9000, sizeMax: math.MaxInt32, ttlSeconds: 600},
{sizeMin: 1800, sizeMax: math.MaxInt32, ttlSeconds: 300},
}
)

View File

@ -211,6 +211,20 @@ func TestDesiredTTL(t *testing.T) {
boundaryStep: 1,
expectedTTL: 0,
},
{
deleteNode: true,
nodeCount: 1800,
desiredTTL: 300,
boundaryStep: 4,
expectedTTL: 60,
},
{
deleteNode: true,
nodeCount: 10000,
desiredTTL: 300,
boundaryStep: 4,
expectedTTL: 300,
},
}
for i, testCase := range testCases {