mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
In making changes for the 5.0 version of snapshots, a bug was introduced where if an index-N file could not be found for an individual shard, the backup was to iterate over all snap-*.dat files in the shard folder to know which snapshots contain that shard's data, but in 5.0, reading the snap-*.dat files as backup was incorrectly passing in the blob name for the snap-*.dat file, thereby failing to load all index files for a given snapshot when the index-N file is missing. This condition should be rare as there is no reason an index-N file should be absent (unless it was deleted or there was corruption reading the file), but nevertheless, this situation can be encountered and this commit fixes the bug by reading the correct snap-*.dat blob name in the shard data folder.