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

Simplify diff calculation for remote routing table #15100

Merged
merged 8 commits into from
Sep 2, 2024

Conversation

Bukhtawar
Copy link
Collaborator

@Bukhtawar Bukhtawar commented Aug 4, 2024

Description

Simplifies diff calculation for remote routing table and makes it compatible with Diff. This change make it simpler to switch between complete diff and incremental diffs.

Some changes in the PR might not be backward compatible with existing Public APIs and would be addressed as a follow up PR

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

Signed-off-by: Bukhtawar Khan <bukhtawa@amazon.com>
Copy link
Contributor

github-actions bot commented Aug 4, 2024

❌ Gradle check result for 3fadc9f: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Aug 4, 2024

❌ Gradle check result for dd25e86: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Aug 4, 2024

❌ Gradle check result for 4625fc9: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Aug 4, 2024

❌ Gradle check result for 4cc04c6: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Aug 4, 2024

❌ Gradle check result for d284c32: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Aug 4, 2024

❌ Gradle check result for b1781a0: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Aug 4, 2024

❌ Gradle check result for 607317a: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Aug 4, 2024

❌ Gradle check result for 4607c5d: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Aug 4, 2024

❌ Gradle check result for 9b5c271: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

✅ Gradle check result for cfde447: SUCCESS

Signed-off-by: Shailendra Singh <singhlhs@amazon.com>
Copy link
Contributor

github-actions bot commented Sep 2, 2024

❌ Gradle check result for f9567e1: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Sep 2, 2024

❌ Gradle check result for 40c9372: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Sep 2, 2024

❌ Gradle check result for 11d6e8e: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Shailendra Singh <singhlhs@amazon.com>
Copy link
Contributor

github-actions bot commented Sep 2, 2024

❌ Gradle check result for 50c98d0: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Sep 2, 2024

❌ Gradle check result for 33535ed: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Shailendra Singh <singhlhs@amazon.com>
Copy link
Contributor

github-actions bot commented Sep 2, 2024

✅ Gradle check result for ea927cc: SUCCESS

@Bukhtawar Bukhtawar merged commit 7247266 into opensearch-project:main Sep 2, 2024
33 of 34 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 2, 2024
Simplify diff calculation logic for remote routing table

Signed-off-by: Bukhtawar Khan <bukhtawa@amazon.com>
Co-authored-by: Shailendra Singh <singhlhs@amazon.com>
(cherry picked from commit 7247266)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Comment on lines +538 to +541
&& routingTableDiff.provideDiff() != null
&& (!routingTableDiff.provideDiff().getDiffs().isEmpty()
|| !routingTableDiff.provideDiff().getDeletes().isEmpty()
|| !routingTableDiff.provideDiff().getUpserts().isEmpty())) ? 1 : 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: looks like repeated logic, can we extract this out, or maybe add a method like hasDiff in the routingTableDiff object?

updatedIndexRouting.addAll(
remoteRoutingTableService.getUpdatedIndexRoutingTableMetadata(diff.getIndicesRoutingUpdated(), manifest.getIndicesRouting())
);
if (manifest.getCodecVersion() == CODEC_V2 || manifest.getCodecVersion() == CODEC_V3) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we just check Codec < V4?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants