Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IndexShard#getLatestReplicationCheckpoint behind segrep enable feature flag #4163

Merged

Conversation

dreamer-89
Copy link
Member

@dreamer-89 dreamer-89 commented Aug 8, 2022

Signed-off-by: Suraj Singh surajrider@gmail.com

Description

Came from discussion in #4041 (comment), this PR adds getLatestReplicationCheckpoint behind feature flag.

Issues Related

#2212 #3988

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…ature flag

Signed-off-by: Suraj Singh <surajrider@gmail.com>
@dreamer-89 dreamer-89 requested review from a team and reta as code owners August 8, 2022 18:30
Copy link
Member

@mch2 mch2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nit.

Signed-off-by: Suraj Singh <surajrider@gmail.com>
@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2022

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2022

Gradle Check (Jenkins) Run Completed with:

@dreamer-89
Copy link
Member Author

The gradle check looks like have a legit failure

REPRODUCE WITH: ./gradlew ':server:test' --tests "org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.testReplicationOnDone" -Dtests.seed=F2650EF01D035C3B -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=it -Dtests.timezone=Asia/Aqtobe -Druntime.java=17

org.opensearch.indices.replication.SegmentReplicationTargetServiceTests > testReplicationOnDone FAILED
    java.lang.NullPointerException: Cannot invoke "org.opensearch.indices.replication.checkpoint.ReplicationCheckpoint.getShardId()" because "this.initialCheckpoint" is null
        at __randomizedtesting.SeedInfo.seed([F2650EF01D035C3B:E8ABDE3DD7FFB399]:0)
        at org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.setUp(SegmentReplicationTargetServiceTests.java:66)

REPRODUCE WITH: ./gradlew ':server:test' --tests "org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.testShardAlreadyReplicating" -Dtests.seed=F2650EF01D035C3B -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=it -Dtests.timezone=Asia/Aqtobe -Druntime.java=17

org.opensearch.indices.replication.SegmentReplicationTargetServiceTests > testShardAlreadyReplicating FAILED
    java.lang.NullPointerException: Cannot invoke "org.opensearch.indices.replication.checkpoint.ReplicationCheckpoint.getShardId()" because "this.initialCheckpoint" is null
        at __randomizedtesting.SeedInfo.seed([F2650EF01D035C3B:D1BC8BEB97C49532]:0)
        at org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.setUp(SegmentReplicationTargetServiceTests.java:66)

REPRODUCE WITH: ./gradlew ':server:test' --tests "org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.testNewCheckpoint_validationPassesAndReplicationFails" -Dtests.seed=F2650EF01D035C3B -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=it -Dtests.timezone=Asia/Aqtobe -Druntime.java=17

org.opensearch.indices.replication.SegmentReplicationTargetServiceTests > testNewCheckpoint_validationPassesAndReplicationFails FAILED
    java.lang.NullPointerException: Cannot invoke "org.opensearch.indices.replication.checkpoint.ReplicationCheckpoint.getShardId()" because "this.initialCheckpoint" is null
        at __randomizedtesting.SeedInfo.seed([F2650EF01D035C3B:D84FBDC9FED9E1BA]:0)
        at org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.setUp(SegmentReplicationTargetServiceTests.java:66)

REPRODUCE WITH: ./gradlew ':server:test' --tests "org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.testAlreadyOnNewCheckpoint" -Dtests.seed=F2650EF01D035C3B -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=it -Dtests.timezone=Asia/Aqtobe -Druntime.java=17

org.opensearch.indices.replication.SegmentReplicationTargetServiceTests > testAlreadyOnNewCheckpoint FAILED
    java.lang.NullPointerException: Cannot invoke "org.opensearch.indices.replication.checkpoint.ReplicationCheckpoint.getShardId()" because "this.initialCheckpoint" is null
        at __randomizedtesting.SeedInfo.seed([F2650EF01D035C3B:B0BE1A7DA4F7BCC7]:0)
        at org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.setUp(SegmentReplicationTargetServiceTests.java:66)

REPRODUCE WITH: ./gradlew ':server:test' --tests "org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.testNewCheckpointBehindCurrentCheckpoint" -Dtests.seed=F2650EF01D035C3B -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=it -Dtests.timezone=Asia/Aqtobe -Druntime.java=17

org.opensearch.indices.replication.SegmentReplicationTargetServiceTests > testNewCheckpointBehindCurrentCheckpoint FAILED
    java.lang.NullPointerException: Cannot invoke "org.opensearch.indices.replication.checkpoint.ReplicationCheckpoint.getShardId()" because "this.initialCheckpoint" is null
        at __randomizedtesting.SeedInfo.seed([F2650EF01D035C3B:68A6B7BA36E97637]:0)
        at org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.setUp(SegmentReplicationTargetServiceTests.java:66)

REPRODUCE WITH: ./gradlew ':server:test' --tests "org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.testBeforeIndexShardClosed_CancelsOngoingReplications" -Dtests.seed=F2650EF01D035C3B -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=it -Dtests.timezone=Asia/Aqtobe -Druntime.java=17

org.opensearch.indices.replication.SegmentReplicationTargetServiceTests > testBeforeIndexShardClosed_CancelsOngoingReplications FAILED
    java.lang.NullPointerException: Cannot invoke "org.opensearch.indices.replication.checkpoint.ReplicationCheckpoint.getShardId()" because "this.initialCheckpoint" is null
        at __randomizedtesting.SeedInfo.seed([F2650EF01D035C3B:800E2FC6951F71F0]:0)
        at org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.setUp(SegmentReplicationTargetServiceTests.java:66)
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.gradle.api.internal.tasks.testing.worker.TestWorker (file:/home/ubuntu/.gradle/wrapper/dists/gradle-7.5-all/6qsw290k5lz422uaf8jf6m7co/gradle-7.5/lib/plugins/gradle-testing-****-7.5.jar)
WARNING: Please consider reporting this to the maintainers of org.gradle.api.internal.tasks.testing.worker.TestWorker
WARNING: System::setSecurityManager will be removed in a future release

REPRODUCE WITH: ./gradlew ':server:test' --tests "org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.testTargetThrowsException" -Dtests.seed=F2650EF01D035C3B -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=it -Dtests.timezone=Asia/Aqtobe -Druntime.java=17

org.opensearch.indices.replication.SegmentReplicationTargetServiceTests > testTargetThrowsException FAILED
    java.lang.NullPointerException: Cannot invoke "org.opensearch.indices.replication.checkpoint.ReplicationCheckpoint.getShardId()" because "this.initialCheckpoint" is null
        at __randomizedtesting.SeedInfo.seed([F2650EF01D035C3B:3BFFE9A7800C979B]:0)
        at org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.setUp(SegmentReplicationTargetServiceTests.java:66)
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.gradle.api.internal.tasks.testing.worker.TestWorker (file:/home/ubuntu/.gradle/wrapper/dists/gradle-7.5-all/6qsw290k5lz422uaf8jf6m7co/gradle-7.5/lib/plugins/gradle-testing-****-7.5.jar)
WARNING: Please consider reporting this to the maintainers of org.gradle.api.internal.tasks.testing.worker.TestWorker
WARNING: System::setSecurityManager will be removed in a future release

REPRODUCE WITH: ./gradlew ':server:test' --tests "org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.testTargetReturnsSuccess_listenerCompletes" -Dtests.seed=F2650EF01D035C3B -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=it -Dtests.timezone=Asia/Aqtobe -Druntime.java=17

org.opensearch.indices.replication.SegmentReplicationTargetServiceTests > testTargetReturnsSuccess_listenerCompletes FAILED
    java.lang.NullPointerException: Cannot invoke "org.opensearch.indices.replication.checkpoint.ReplicationCheckpoint.getShardId()" because "this.initialCheckpoint" is null
        at __randomizedtesting.SeedInfo.seed([F2650EF01D035C3B:F9DE9955F8C69EA6]:0)
        at org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.setUp(SegmentReplicationTargetServiceTests.java:66)

REPRODUCE WITH: ./gradlew ':server:test' --tests "org.opensearch.indices.replication.SegmentReplicationSourceHandlerTests.testSendFiles_emptyRequest" -Dtests.seed=F2650EF01D035C3B -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=ja-JP -Dtests.timezone=Etc/GMT+2 -Druntime.java=17

org.opensearch.indices.replication.SegmentReplicationSourceHandlerTests > testSendFiles_emptyRequest FAILED
    java.lang.AssertionError
        at __randomizedtesting.SeedInfo.seed([F2650EF01D035C3B:F50229272AF394A]:0)
        at org.junit.Assert.fail(Assert.java:87)
        at org.junit.Assert.fail(Assert.java:96)
        at org.opensearch.indices.replication.SegmentReplicationSourceHandlerTests$2.onFailure(SegmentReplicationSourceHandlerTests.java:124)
        at org.opensearch.action.ActionRunnable.onFailure(ActionRunnable.java:103)
        at org.opensearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:54)
        at org.opensearch.common.util.concurrent.OpenSearchExecutors$DirectExecutorService.execute(OpenSearchExecutors.java:341)
        at org.opensearch.common.util.concurrent.ListenableFuture.notifyListener(ListenableFuture.java:120)
        at org.opensearch.common.util.concurrent.ListenableFuture.lambda$done$0(ListenableFuture.java:112)
        at java.****/java.util.ArrayList.forEach(ArrayList.java:1511)
        at org.opensearch.common.util.concurrent.ListenableFuture.done(ListenableFuture.java:112)
        at org.opensearch.common.util.concurrent.BaseFuture.setException(BaseFuture.java:178)
        at org.opensearch.common.util.concurrent.ListenableFuture.onFailure(ListenableFuture.java:149)
        at org.opensearch.indices.replication.SegmentReplicationSourceHandler.lambda$sendFiles$1(SegmentReplicationSourceHandler.java:111)
        at org.opensearch.core.internal.io.IOUtils.close(IOUtils.java:87)
        at org.opensearch.core.internal.io.IOUtils.closeWhileHandlingException(IOUtils.java:177)
        at org.opensearch.core.internal.io.IOUtils.closeWhileHandlingException(IOUtils.java:167)
        at org.opensearch.core.internal.io.IOUtils.closeWhileHandlingException(IOUtils.java:155)
        at org.opensearch.indices.replication.SegmentReplicationSourceHandler.lambda$sendFiles$2(SegmentReplicationSourceHandler.java:111)
        at org.opensearch.action.ActionListener$1.onFailure(ActionListener.java:88)
        at org.opensearch.action.ActionListener$1.onResponse(ActionListener.java:82)
        at org.opensearch.common.util.concurrent.ListenableFuture$1.doRun(ListenableFuture.java:126)
        at org.opensearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:52)
        at org.opensearch.common.util.concurrent.OpenSearchExecutors$DirectExecutorService.execute(OpenSearchExecutors.java:341)
        at org.opensearch.common.util.concurrent.ListenableFuture.notifyListener(ListenableFuture.java:120)
        at org.opensearch.common.util.concurrent.ListenableFuture.addListener(ListenableFuture.java:82)
        at org.opensearch.action.StepListener.whenComplete(StepListener.java:93)
        at org.opensearch.indices.replication.SegmentReplicationSourceHandler.sendFiles(SegmentReplicationSourceHandler.java:144)
        at org.opensearch.indices.replication.SegmentReplicationSourceHandlerTests.testSendFiles_emptyRequest(SegmentReplicationSourceHandlerTests.java:115)

…rTests

Signed-off-by: Suraj Singh <surajrider@gmail.com>
* Returns the lastest Replication Checkpoint that shard received. Shards will return an EMPTY checkpoint before
* the engine is opened.
* Returns the latest ReplicationCheckpoint that shard received.
* @return EMPTY checkpoint before the engine is opened and null for non-segrep enabled indices
*/
public ReplicationCheckpoint getLatestReplicationCheckpoint() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we change the signature to Optional as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we change the signature to Optional as well?

Thanks @Bukhtawar for the review. Did you mean updating java doc to mention this method is applicable only for SegRep enabled indices ?

@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2022

Gradle Check (Jenkins) Run Completed with:

@dreamer-89
Copy link
Member Author

Last gradle job fail with below, which is not failing on local. Refiring the gradle check

REPRODUCE WITH: ./gradlew ':server:test' --tests "org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.testReplicationOnDone" -Dtests.seed=7736EA6F094D816D -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=bg-BG -Dtests.timezone=Africa/Dakar -Druntime.java=17

org.opensearch.indices.replication.SegmentReplicationTargetServiceTests > testReplicationOnDone FAILED
    org.mockito.exceptions.verification.TooFewActualInvocations: 
    segmentReplicationTargetService.onNewCheckpoint(
        ReplicationCheckpoint{shardId=[index][0], primaryTerm=85, segmentsGen=2, seqNo=-1, version=7},
        <any>
    );
    Wanted 2 times:
    -> at org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.testReplicationOnDone(SegmentReplicationTargetServiceTests.java:240)
    But was 1 time:
    -> at org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.testReplicationOnDone(SegmentReplicationTargetServiceTests.java:234)
        at __randomizedtesting.SeedInfo.seed([7736EA6F094D816D:6DF83AA2C3B16ECF]:0)
        at app//org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.testReplicationOnDone(SegmentReplicationTargetServiceTests.java:240)`REPRODUCE WITH: ./gradlew ':server:test' --tests "org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.testReplicationOnDone" -Dtests.seed=7736EA6F094D816D -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=bg-BG -Dtests.timezone=Africa/Dakar -Druntime.java=17

org.opensearch.indices.replication.SegmentReplicationTargetServiceTests > testReplicationOnDone FAILED
    org.mockito.exceptions.verification.TooFewActualInvocations: 
    segmentReplicationTargetService.onNewCheckpoint(
        ReplicationCheckpoint{shardId=[index][0], primaryTerm=85, segmentsGen=2, seqNo=-1, version=7},
        <any>
    );
    Wanted 2 times:
    -> at org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.testReplicationOnDone(SegmentReplicationTargetServiceTests.java:240)
    But was 1 time:
    -> at org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.testReplicationOnDone(SegmentReplicationTargetServiceTests.java:234)
        at __randomizedtesting.SeedInfo.seed([7736EA6F094D816D:6DF83AA2C3B16ECF]:0)
        at app//org.opensearch.indices.replication.SegmentReplicationTargetServiceTests.testReplicationOnDone(SegmentReplicationTargetServiceTests.java:240)

@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2022

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2022

Gradle Check (Jenkins) Run Completed with:

@dreamer-89 dreamer-89 merged commit a120dd2 into opensearch-project:main Aug 9, 2022
dreamer-89 added a commit to dreamer-89/OpenSearch that referenced this pull request Aug 12, 2022
…ature flag (opensearch-project#4163)

* Add IndexShard#getLatestReplicationCheckpoint behind segrep enable feature flag

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Address review comment. Move tests to SegmentReplicationIndexShardTests

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Add segrep enbaled index settings in TargetServiceTests, SourceHandlerTests

Signed-off-by: Suraj Singh <surajrider@gmail.com>
Rishikesh1159 pushed a commit to Rishikesh1159/OpenSearch that referenced this pull request Aug 17, 2022
…ature flag (opensearch-project#4163)

* Add IndexShard#getLatestReplicationCheckpoint behind segrep enable feature flag

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Address review comment. Move tests to SegmentReplicationIndexShardTests

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Add segrep enbaled index settings in TargetServiceTests, SourceHandlerTests

Signed-off-by: Suraj Singh <surajrider@gmail.com>
Rishikesh1159 added a commit that referenced this pull request Aug 17, 2022
…aining segment replication changes (#4243)

* [Segment Replication] Checkpoint Replay on Replica Shard (#3658)

* Adding Latest Recevied checkpoint, replay checkpoint logic along with tests

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

* [Segment Replication] Wire up segment replication with peer recovery and add ITs. (#3743)

* Add null check when computing max segment version.

With segment replication enabled it is possible Lucene does not set the SegmentInfos
min segment version, leaving the default value as null.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Update peer recovery to set the translogUUID of replicas to the UUID generated on the primary.

This change updates the UUID when the translog is created to the value stored in the passed segment userdata.
This is to ensure during failover scenarios that the replica can be promoted and not have a uuid mismatch with the value stored in user data.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Wire up Segment Replication under the feature flag.

This PR wires up segment replication and adds some initial integration tests.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Add test to ensure replicas use primary translog uuid with segrep.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Update SegmentReplicationIT to assert previous commit points are valid and SegmentInfos can be built.
Fix nitpicks in PR feedback.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Fix test with Assert.fail to include a message.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Disable shard idle with segment replication. (#4118)

This change disables shard idle when segment replication is enabled.
Primary shards will only push out new segments on refresh, we do not want to block this based on search behavior.
Replicas will only refresh on an externally provided SegmentInfos, so we do not want search requests to hang waiting for a refresh.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Fix isAheadOf logic for ReplicationCheckpoint comparison (#4112)

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Fix waitUntil refresh policy for segrep enabled indices. (#4137)

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Add IndexShard#getLatestReplicationCheckpoint behind segrep enable feature flag (#4163)

* Add IndexShard#getLatestReplicationCheckpoint behind segrep enable feature flag

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Address review comment. Move tests to SegmentReplicationIndexShardTests

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Add segrep enbaled index settings in TargetServiceTests, SourceHandlerTests

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* [Segment Replication] Fix OngoingSegmentReplications to key by allocation ID instead of DiscoveryNode. (#4182)

* Fix OngoingSegmentReplications to key by allocation ID instead of DiscoveryNode.

This change fixes segrep to work with multiple shards per node by keying ongoing replications on
allocation ID.  This also updates cancel methods to ensure state is properly cleared on shard cancel.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Clean up cancel methods.

Signed-off-by: Marc Handalian <handalm@amazon.com>

Signed-off-by: Marc Handalian <handalm@amazon.com>

* [Bug] [Segment Replication] Update store metadata recovery diff logic to ignore missing files causing exception (#4185)

* Update Store for segment replication dif

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

Signed-off-by: Poojita Raj <poojiraj@amazon.com>

* Update recoveryDiff logic to ingore missing files causing exception on replica during copy

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Address review comments

Signed-off-by: Suraj Singh <surajrider@gmail.com>

Signed-off-by: Poojita Raj <poojiraj@amazon.com>
Signed-off-by: Suraj Singh <surajrider@gmail.com>
Co-authored-by: Poojita Raj <poojiraj@amazon.com>

* [Segment Replication] Adding PrimaryMode check before publishing checkpoint and processing a received checkpoint. (#4157)

* Adding PrimaryMode check before publishing checkpoint.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

* Applying spotless check

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

* Moving segrep specific tests to SegmentReplicationIndexShardTests.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

* Adding logic and tests for rejecting checkpoints if shard is in PrimaryMode.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

* Applying ./gradlew :server:spotlessApply.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

* Applying ./gradlew :server:spotlessApply

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

* Changing log level to warn in shouldProcessCheckpoint() of IndexShard.java class.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

* Removing unnecessary lazy logging in shouldProcessCheckpoint().

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

* [Segment Replication] Wait for documents to replicate to replica shards (#4236)

* [Segment Replication] Add thread sleep to account for replica lag in delete operations test

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Address review comments, assertBusy on doc count rather than sleep

Signed-off-by: Suraj Singh <surajrider@gmail.com>

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Segment Replication - Remove unnecessary call to markAllocationIdAsInSync. (#4224)

This PR Removes an unnecessary call to markAllocationIdAsInSync on the primary shard when replication events complete.
Recovery will manage this initial call.

Signed-off-by: Marc Handalian <handalm@amazon.com>

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Segment Replication - Add additional unit tests for update & delete ops. (#4237)

* Segment Replication - Add additional unit tests for update & delete operations.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Fix spotless.

Signed-off-by: Marc Handalian <handalm@amazon.com>

Signed-off-by: Marc Handalian <handalm@amazon.com>

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>
Signed-off-by: Marc Handalian <handalm@amazon.com>
Signed-off-by: Suraj Singh <surajrider@gmail.com>
Signed-off-by: Poojita Raj <poojiraj@amazon.com>
Co-authored-by: Marc Handalian <handalm@amazon.com>
Co-authored-by: Suraj Singh <surajrider@gmail.com>
Co-authored-by: Poojita Raj <poojiraj@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants