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

changed few naming conventions. #75

Merged
merged 1 commit into from
Aug 9, 2021
Merged

changed few naming conventions. #75

merged 1 commit into from
Aug 9, 2021

Conversation

naveenpajjuri
Copy link
Contributor

  1. remote to leader, 2. local to follower, etc

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

  • 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.

Copy link
Collaborator

@krishna-ggk krishna-ggk left a 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.

@naveenpajjuri naveenpajjuri force-pushed the naming_change branch 2 times, most recently from 3425e50 to 87e1c90 Compare August 3, 2021 10:14
Copy link
Member

@saikaranam-amazon saikaranam-amazon left a 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

Copy link
Collaborator

@krishna-ggk krishna-ggk left a 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)
Copy link
Collaborator

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.

Copy link
Member

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

Comment on lines 282 to 289
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()
Copy link
Collaborator

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?

Copy link
Member

Choose a reason for hiding this comment

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

Done

@soosinha soosinha force-pushed the naming_change branch 2 times, most recently from b6a299f to cef0322 Compare August 9, 2021 09:05
1. remote to leader, 2. local to follower, etc

Signed-off-by: naveen pajjuri <[email protected]>
Copy link
Member

@saikaranam-amazon saikaranam-amazon left a comment

Choose a reason for hiding this comment

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

LGTM

@soosinha soosinha merged commit 49693ad into main Aug 9, 2021
@soosinha soosinha deleted the naming_change branch August 9, 2021 11:17
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.

4 participants