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
[Segment Replication] - Update replicas to commit SegmentInfos instead of relying on segments_N from primary shards. (opensearch-project#4402)
* Segment Replication - Update replicas to commit SegmentInfos instead of relying on segments_N from primary shards.
This change updates replicas to commit SegmentInfos before the shard is closed, on receiving a new commit point from a primary, and when a new primary is detected. This change also makes the public commitSegmentInfos on NRTEngine obsolete, refactoring IndexShard to simply call reset on the engine.
Signed-off-by: Marc Handalian <[email protected]>
* Remove noise & extra log statement.
Signed-off-by: Marc Handalian <[email protected]>
* PR feedback.
Signed-off-by: Marc Handalian <[email protected]>
Signed-off-by: Marc Handalian <[email protected]>
- Use RemoteSegmentStoreDirectory instead of RemoteDirectory ([#4240](https://github.com/opensearch-project/OpenSearch/pull/4240))
13
13
- Add index specific setting for remote repository ([#4253](https://github.com/opensearch-project/OpenSearch/pull/4253))
14
+
-[Segment Replication] Update replicas to commit SegmentInfos instead of relying on SIS files from primary shards. ([#4402](https://github.com/opensearch-project/OpenSearch/pull/4402))
* With segment replication enabled - prepare the shard's engine to be promoted as the new primary.
4138
-
*
4139
-
* If this shard is currently using a replication engine, this method:
4140
-
* 1. Invokes {@link NRTReplicationEngine#commitSegmentInfos()} to ensure the engine can be reopened as writeable from the latest refresh point.
4141
-
* InternalEngine opens its IndexWriter from an on-disk commit point, but this replica may have recently synced from a primary's refresh point, meaning it has documents searchable in its in-memory SegmentInfos
4142
-
* that are not part of a commit point. This ensures that those documents are made part of a commit and do not need to be reindexed after promotion.
4143
-
* 2. Invokes resetEngineToGlobalCheckpoint - This call performs the engine swap, opening up as a writeable engine and replays any operations in the xlog. The operations indexed from xlog here will be
4144
-
* any ack'd writes that were not copied to this replica before promotion.
0 commit comments