-
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 names for assume roles to remote and local from leader and follower #29
Changed names for assume roles to remote and local from leader and follower #29
Conversation
src/main/kotlin/com/amazon/elasticsearch/replication/action/index/ReplicateIndexRequest.kt
Outdated
Show resolved
Hide resolved
log.debug("Prefer node is ${shardRouting.currentNodeId()}") | ||
return "_prefer_nodes:${shardRouting.currentNodeId()}" |
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.
- Should we be using
_only_nodes
instead or probably have a param which will do that? (Something like DDB consistent reads where the callers can explicitly opt for getting consistent state where required and getting from replica where slight staleness is ok) - Can we include the index or something as well in the log? (Basically trying to see if we can connect the log statement to appropriate index if that isn't part of log context)
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.
Added the index info to the log. we can discuss regarding the _only_nodes
as param
f8562cf
to
b95b8ce
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.
Please update the discussion details on preference. Rest looks good.
const val LEADER_FGAC_ROLE = "leader_fgac_role" | ||
const val FOLLOWER_FGAC_ROLE = "follower_fgac_role" | ||
const val LEADER_FGAC_ROLE = "remote_cluster_role" | ||
const val FOLLOWER_FGAC_ROLE = "local_cluster_role" | ||
private val INDEX_REQ_PARSER = ObjectParser<ReplicateIndexRequest, Void>("FollowIndexRequestParser") { ReplicateIndexRequest() } |
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.
Nit - we could have renamed var names 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.
LGTM. One minor comment.
src/main/kotlin/com/amazon/elasticsearch/replication/metadata/store/ReplicationMetadataStore.kt
Outdated
Show resolved
Hide resolved
@@ -66,7 +66,7 @@ fun <Req, Resp> Client.suspending(fn: (Req, ActionListener<Resp>) -> Unit, | |||
} | |||
} | |||
|
|||
fun <Req, Resp> Client.suspending(replicationMetadata: ReplicationMetadata, | |||
suspend fun <Req, Resp> Client.suspending(replicationMetadata: ReplicationMetadata, |
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.
Just for my understanding, Why are we making these suspend?
because some non suspend methods might be calling them right?
6d62e81
b95b8ce
to
6d62e81
Compare
…llower Added preference to fetch the metdata from the primary shard Additional logging for the metadata store
6d62e81
to
6c3698e
Compare
Description
Issues Resolved
N/A
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.