Use ContainerSharderConf class in sharder and manage-shard-ranges

Change the swift-manage-shard-ranges default expansion-limit to equal
the sharder daemon default merge_size i.e 750000. The previous default
of 500000 had erroneously differed from the sharder default value.

Introduce a ContainerSharderConf class to encapsulate loading of
sharder conf and the definition of defaults. ContainerSharder inherits
this and swift-manage-shard-ranges instantiates it.

Rename ContainerSharder member vars to match the equivalent vars and
cli options in manage_shard_ranges:

  shrink_size -> shrink_threshold
  merge_size -> expansion_limit
  split_size -> rows_per_shard

(This direction of renaming is chosen so that the manage_shard_ranges
cli options are not changed.)

Rename ContainerSharder member vars to match the conf file option name:
  scanner_batch_size -> shard_scanner_batch_size

Remove some ContainerSharder member vars that were not used outside of
the __init__ method:

  shrink_merge_point
  shard_shrink_point

Change-Id: I8a58a82c08ac3abaddb43c11d26fda9fb45fe6c1
This commit is contained in:
Alistair Coles
2021-03-02 18:32:13 +00:00
parent bbe189b537
commit f7fd99a880
6 changed files with 241 additions and 160 deletions

View File

@@ -363,12 +363,12 @@ shard_shrink_merge_point 75 When auto-sharding is
For example, if
shard_container_threshold
is 1 million,
shard_shrink_point is 5,
shard_shrink_point is 10,
and shard_shrink_merge_point
is 75 then a shard will
be considered for
shrinking if it has less
than or equal to 50
than or equal to 100
thousand objects but will
only merge into an
acceptor if the combined