-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Moving RecoveryState.Index to a top-level class and renaming #3075
Conversation
2 flaky failures
|
start gradle check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a straightforward, nice, rote refactor. I left some change requests for javadocs and making a few classes final and/or private. During these refactors I'd like for us to start marking internal classes accordingly (using @opensearch.internal
) and using the final
modifier liberally. Since OpenSearch has an API for "external" plugins to extend we need to start putting lines of demarcation around what we allow to be extended vs internal.
server/src/main/java/org/opensearch/indices/replication/common/ReplicationLuceneIndex.java
Show resolved
Hide resolved
server/src/main/java/org/opensearch/indices/replication/common/ReplicationLuceneIndex.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/indices/replication/common/ReplicationLuceneIndex.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/indices/replication/common/ReplicationLuceneIndex.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/indices/replication/common/ReplicationLuceneIndex.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/indices/replication/common/ReplicationLuceneIndex.java
Show resolved
Hide resolved
server/src/main/java/org/opensearch/indices/replication/common/ReplicationLuceneIndex.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/indices/replication/common/ReplicationLuceneIndex.java
Outdated
Show resolved
Hide resolved
The easier solution is to just remove the |
More mocking that needs fixing.
|
|
✅ Gradle Check success 9bec21260568a7eb1e32a97d3645677981971a4f |
This class is a building block of replication and will be re-used between peer recovery and segment replication. Thus, the inner class has been extracted to a top-level class and moved to the replication.common package. It has been renamed to ReplicationLuceneIndex to better reflect what it represents. It has two dependent inner classes from RecoveryState that have also been moved along with it - these remain inner classes since they are not currently used anywhere else. The RecoveryFilesDetails class has been renamed to FilesDetails and the FileDetail class has been renamed to FileMetadata. Signed-off-by: Kartik Ganesh <gkart@amazon.com>
Signed-off-by: Kartik Ganesh <gkart@amazon.com>
Signed-off-by: Kartik Ganesh <gkart@amazon.com>
Instead, the test now populates dummy data. Signed-off-by: Kartik Ganesh <gkart@amazon.com>
The class has been marked final, so it can no longer be mocked. Instead, the test class sets up the lucene index class by adding the smae file metadata that is set up for the store. Signed-off-by: Kartik Ganesh <gkart@amazon.com>
Signed-off-by: Kartik Ganesh <gkart@amazon.com>
9bec212
to
2077d76
Compare
✅ Gradle Check success 23f8822b6af5786875b4e88f814c9c2c38c10795 |
This reverts commit 2077d76. Signed-off-by: Kartik Ganesh <gkart@amazon.com>
23f8822
to
51b9c81
Compare
The backport to
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
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-3075-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 44573baff2b486336b5a133c286af142bc2bdc56
# Push it to GitHub
git push --set-upstream origin backport/backport-3075-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x Then, create a pull request where the |
…n RecoveryState class Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>
Signed-off-by: Kartik Ganesh gkart@amazon.com
Description
This class is a building block of replication and will be re-used between peer recovery and segment replication. Thus, the inner class has been extracted to a top-level class and moved to the
replication.common
package. It has been renamed toReplicationLuceneIndex
to better reflect what it represents. It has two dependent inner classes fromRecoveryState
that have also been moved along with it - these remain inner classes since they are not currently used anywhere else. TheRecoveryFilesDetails
class has been renamed toFilesDetails
and theFileDetail
class has been renamed toFileMetadata
.This is a part of the process of merging our feature branch -
feature/segment-replication
- back into main by re-PRing our changes from the feature branch.The breakdown of the plan to merge segment-replication to main is detailed in #2355
Segment replication design proposal - #2229
Issues Resolved
[List any issues this PR will resolve]
Check List
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.