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

Changes to enable “shouldForward” gating #2084

Conversation

kartg
Copy link
Member

@kartg kartg commented Feb 10, 2022

This change adds a shouldForward operation to the ReplicationOperation.PrimaryResult interface. This is used by the logic in ReplicationOperation to gate forwarding of the request to replicas. The TransportReplicationAction.PrimaryResult subclass incorporates a member variable to store this value. The value is eventually populated by the WritePrimaryResult constructor, based on a new IndexShard API. This API internally depends on the segment-replication setting.

Meanwhile, other implementing classes just use a defuault hard-coded implementation to maintain backwards compatibility.

Signed-off-by: Kartik Ganesh [email protected]

Description

[Describe what this change achieves]

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

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.

This change adds a shouldForward operation to the ReplicationOperation.PrimaryResult interface. This is used by the logic in ReplicationOperation to gate forwarding of the request to replicas. The TransportReplicationAction.PrimaryResult subclass incorporates a member variable to store this value. The value is eventually populated by the WritePrimaryResult constructor, based on a new IndexShard API. This API internally depends on the segment-replication setting.

Meanwhile, other implementing classes just use a defuault hard-coded implementation to maintain backwards compatibility.

Signed-off-by: Kartik Ganesh <[email protected]>
@kartg kartg requested a review from a team as a code owner February 10, 2022 18:44
@opensearch-ci-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 18fb405
Log 2325

Reports 2325

@kartg
Copy link
Member Author

kartg commented Feb 11, 2022

The changes in this PR aren't necessary for building the initial portions of segment replication, so I'm going to abandon this change. Instead, I'll focus on improving the changes proposed in the POC PR

@kartg kartg closed this Feb 11, 2022
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.

2 participants