-
Notifications
You must be signed in to change notification settings - Fork 61
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
changed few naming conventions. #75
Conversation
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 good, but I feel we can use this opportunity to also fix the variable names.
...lin/com/amazon/elasticsearch/replication/action/autofollow/UpdateAutoFollowPatternRequest.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/amazon/elasticsearch/replication/task/index/IndexReplicationParams.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/amazon/elasticsearch/replication/task/index/IndexReplicationParams.kt
Outdated
Show resolved
Hide resolved
3425e50
to
87e1c90
Compare
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.
LGTM.
Please validate by running tests with and without security plugin
./gradlew clean release -Psecurity=true
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.
LGTM - just couple more rename suggestions.
RemoteClusterRestoreLeaderService::class.java, RemoteClusterTranslogService::class.java) | ||
LeaderClusterRestoreLeaderService::class.java, LeaderClusterTranslogService::class.java) |
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.
This should remain IMO as it is more of a remote cluster accessor. We just happen to use it to reference leader cluster.
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.
Reverted to RemoteClusterRestoreLeaderService and RemoteClusterTranslogService
val remoteShardRouting = leaderClusterState.routingTable.shardRoutingTable(snapshotShardId.indexName, | ||
snapshotShardId.id).primaryShard() | ||
remoteShardNode = remoteClusterState.nodes.get(remoteShardRouting.currentNodeId()) | ||
// Get the index UUID of the remote cluster for the metadata request | ||
remoteShardNode = leaderClusterState.nodes.get(remoteShardRouting.currentNodeId()) | ||
// Get the index UUID of the leader cluster for the metadata request | ||
remoteShardId = ShardId(snapshotShardId.indexName, | ||
remoteClusterState.metadata.index(indexId.name).indexUUID, | ||
leaderClusterState.metadata.index(indexId.name).indexUUID, | ||
snapshotShardId.id) | ||
restoreUUID = UUIDs.randomBase64UUID() |
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.
Can we rename remoteShardId and remoteShardNode as well?
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.
Done
b6a299f
to
cef0322
Compare
1. remote to leader, 2. local to follower, etc Signed-off-by: naveen pajjuri <[email protected]>
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.
LGTM
Signed-off-by: naveen pajjuri [email protected]
Description
changed the naming convention from remote --> leader and local --> follower.
Testing
Ran all the integration tests.
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.