You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, batches restored with both rclone and native method
used the same batching mechanism. Although batching to smaller
chunks makes sense for rclone restore, as it reduces the risk
of running out of disk space and increases resource util by
having nodes which work at potentially different restore stages
(rclone download / load&stream), this logic doesn't apply to
native restore where sstables are not saved on disk before
they are streamed to the primary replicas. In native restore
case, we want to send as big batches as possible while still
keeping balanced workload distribution.
To achieve that, we just simply reuse the --batch-size=0
behavior making batches containing 5% of expected node
workload, so that batches restored with native method aim
to contain 100% of expected node workload.
To do that, we need to make the decision about restore method
used for given batch restoration during batch dispatch.
This resulted in small code refactor - mainly populating
hostInfo before accessing batching mechanism and adding
restore method as a part of the batch definition.
As working with batches containing 100% of expected node
workload is not granular at all, we might run into problems
with large workload imbalance, as giving one node one
additional batch could push it towards 200% of expected
workload. To fight with that, we create batches containing
up to the remaining expected node bytes, or up to the 5%
as in the --batch-size=0 case, so that when the node already
pushes over the 100% expected workload, it will be receiving
smaller batches that should result in more even distribution.
Fixes#4592
0 commit comments