OpenSearch/test
Tanguy Leroux 87076c32e2
Determine shard size before allocating shards recovering from snapshots (#61906) (#63337)
Determines the shard size of shards before allocating shards that are
recovering from snapshots. It ensures during shard allocation that the
target node that is selected as recovery target will have enough free
disk space for the recovery event. This applies to regular restores,
CCR bootstrap from remote, as well as mounting searchable snapshots.

The InternalSnapshotInfoService is responsible for fetching snapshot
shard sizes from repositories. It provides a getShardSize() method
to other components of the system that can be used to retrieve the
latest known shard size. If the latest snapshot shard size retrieval
failed, the getShardSize() returns
ShardRouting.UNAVAILABLE_EXPECTED_SHARD_SIZE. While
we'd like a better way to handle such failures, returning this value
allows to keep the existing behavior for now.

Note that this PR does not address an issues (we already have today)
where a replica is being allocated without knowing how much disk
space is being used by the primary.

Co-authored-by: Yannick Welsch <yannick@welsch.lu>
2020-10-06 18:37:05 +02:00
..
external-modules Skip release build tests for external test modules (#62579) 2020-09-17 13:08:17 -07:00
fixtures Add repositories metering API (#62088) 2020-09-08 14:01:04 +02:00
framework Determine shard size before allocating shards recovering from snapshots (#61906) (#63337) 2020-10-06 18:37:05 +02:00
logger-usage Add snapshot only test modules (#61954) 2020-09-04 16:35:18 -07:00
build.gradle Add snapshot only test modules (#61954) 2020-09-04 16:35:18 -07:00