OpenSearch/server
Tanguy Leroux eac99dd594
SnapshotShardSizeInfo should prefer default value when provided (#63390) (#63394)
In #61906 we agreed on always providing the default value 
ShardRouting.UNAVAILABLE_EXPECTED_SHARD_SIZE 
when the SnasphotInfoService failed to retrieve the exact 
size for a given snapshot shard. The motivation was to 
allow the shard allocation to move forward in case of 
failures (so that the unassigned shard does not get stuck 
in an unassigned state for too long) while relying on the 
fallback values for shard sizes.

Sadly a bug in the 
SnapshotShardSizeInfo#getShardSize(ShardRouting, long) 
makes the default value to be ignored when the snapshot 
shard size retrieval previously failed, returning 
ShardRouting.UNAVAILABLE_EXPECTED_SHARD_SIZE 
instead of the provided default value. With DiskThresholdDecider 
also not relying on the provided default value this triggers 
some assertion like in #63376 which helped us to spot the bug.

Closes ##63376
2020-10-07 13:53:05 +02:00
..
licenses Upgrade to lucene- 8.7.0-snapshot-66c49a35402 (#63372) 2020-10-06 22:38:58 -04:00
src SnapshotShardSizeInfo should prefer default value when provided (#63390) (#63394) 2020-10-07 13:53:05 +02:00
build.gradle Search - add case insensitive support for regex queries. (#59441) (#61532) 2020-08-25 17:18:59 +01:00