On primary, while building CopyState object as part of get_checkpoint_info transport response, missing index file on local store causes FileNotFoundException. This is repro-able on main containing https://github.com/opensearch-project/OpenSearch/pull/4288 fix
It looks like indexShard object built from IndexService seems to be outdated (still referencing _9.cfe but latest in memory SegmentInfos fetched using getLatestSegmentInfos() in InternalEngine doesn't contains it) file but when metadata is read this file is long ago gone from shard store. From logs (prints SegmentInfos from in memory & disk store) shows that in memory copy held _9.cfe file once but later (index refresh/commit ?) removes all these files and builds new set of files. It is interesting to know why indexShard (built from indexService) is not upto date with in memory state of SegmentInfos
Describe the bug
On primary, while building CopyState object as part of get_checkpoint_info transport response, missing index file on local store causes
FileNotFoundException
. This is repro-able on main containing https://github.com/opensearch-project/OpenSearch/pull/4288 fixIt looks like indexShard object built from IndexService seems to be outdated (still referencing
_9.cfe
but latest in memory SegmentInfos fetched usinggetLatestSegmentInfos()
in InternalEngine doesn't contains it) file but when metadata is read this file is long ago gone from shard store. From logs (prints SegmentInfos from in memory & disk store) shows that in memory copy held _9.cfe file once but later (index refresh/commit ?) removes all these files and builds new set of files. It is interesting to know why indexShard (built from indexService) is not upto date with in memory state of SegmentInfosLog traces
Reproduce
Run below test in contiuation
Host/Environment (please complete the following information):
Note: This is different from https://github.com/opensearch-project/OpenSearch/issues/4178 where FileNotFoundException happends due to missing Segment_N file