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

[Remote Segment Store] Add Lucene major version to UploadedSegmentMetadata #8088

Merged

Conversation

BhumikaSaini-Amazon
Copy link
Contributor

@BhumikaSaini-Amazon BhumikaSaini-Amazon commented Jun 15, 2023

Description

This PR associates the Lucene major version with each uploaded segment file metadata entry that is maintained in remote store. As part of the Lucene version compatibility check, this major version information stored in the metadata will be used to skip downloading the segment files unnecessarily if they were written by an incompatible Lucene version.

  1. For the segment files that house the segment data (.cfe, .cfs, etc.), we track the Lucene major version as captured in the respective SegmentInfo instance.

  2. For the segment_N files that house the information on segments, we track the Lucene major version used for the commit as captured in the respective SegmentInfos instance.

  3. For the _<segmentNumber>_<monotonicallyIncrementingCountOfUpdate>_Lucene<major><minor>_<bugfix>.dvm, _<segmentNumber>_<monotonicallyIncrementingCountOfUpdate>_Lucene<major><minor>_<bugfix>.dvd, and _<segmentNumber>_<monotonicallyIncrementingCountOfUpdate>.fnm files, we track the Lucene major version available in the respective .dvm/.dvd file's name.

Related Issues

Resolves #7722

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
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

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.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Copy link
Member

@andrross andrross left a comment

Choose a reason for hiding this comment

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

Can you add unit tests for the new functionality?

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@BhumikaSaini-Amazon
Copy link
Contributor Author

Some integration tests are failing, looking into those

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Bhumika Saini <[email protected]>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.indices.replication.SegmentReplicationAllocationIT.testSingleIndexShardAllocation

@BhumikaSaini-Amazon
Copy link
Contributor Author

org.opensearch.indices.replication.SegmentReplicationAllocationIT.testSingleIndexShardAllocation is likely flaky, as per #8279

@sachinpkale sachinpkale merged commit 611ecc2 into opensearch-project:main Jul 21, 2023
@sachinpkale sachinpkale added the backport 2.x Backport to 2.x branch label Jul 21, 2023
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-8088-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 611ecc2ad50c7e1833e7fe8ef2a6cabeb6028c57
# Push it to GitHub
git push --set-upstream origin backport/backport-8088-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-8088-to-2.x.

BhumikaSaini-Amazon pushed a commit to BhumikaSaini-Amazon/OpenSearch that referenced this pull request Jul 21, 2023
…adata (opensearch-project#8088)

* Add Lucene version to UploadedSegmentMetadata

---------

Signed-off-by: Bhumika Saini <[email protected]>
(cherry picked from commit 611ecc2)
sachinpkale pushed a commit that referenced this pull request Jul 21, 2023
…adata (#8088) (#8820)

* Add Lucene version to UploadedSegmentMetadata

---------

Signed-off-by: Bhumika Saini <[email protected]>
(cherry picked from commit 611ecc2)
baba-devv pushed a commit to baba-devv/OpenSearch that referenced this pull request Jul 29, 2023
…adata (opensearch-project#8088)

* Add Lucene version to UploadedSegmentMetadata

---------

Signed-off-by: Bhumika Saini <[email protected]>
kaushalmahi12 pushed a commit to kaushalmahi12/OpenSearch that referenced this pull request Sep 12, 2023
…adata (opensearch-project#8088)

* Add Lucene version to UploadedSegmentMetadata

---------

Signed-off-by: Bhumika Saini <[email protected]>
Signed-off-by: Kaushal Kumar <[email protected]>
brusic pushed a commit to brusic/OpenSearch that referenced this pull request Sep 25, 2023
…adata (opensearch-project#8088)

* Add Lucene version to UploadedSegmentMetadata

---------

Signed-off-by: Bhumika Saini <[email protected]>
Signed-off-by: Ivan Brusic <[email protected]>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…adata (opensearch-project#8088)

* Add Lucene version to UploadedSegmentMetadata

---------

Signed-off-by: Bhumika Saini <[email protected]>
Signed-off-by: Shivansh Arora <[email protected]>
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 Storage:Durability Issues and PRs related to the durability framework v2.9.0 'Issues and PRs related to version v2.9.0'
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Remote Store] Persist StoreFileMetadata fields in Remote Store
6 participants