-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
create publication repos during join task execution #16383
base: main
Are you sure you want to change the base?
create publication repos during join task execution #16383
Conversation
❌ Gradle check result for f54d4f3: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
f54d4f3
to
7a56884
Compare
❌ Gradle check result for 7a56884: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
7a56884
to
c23f86e
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #16383 +/- ##
============================================
- Coverage 72.07% 72.05% -0.02%
- Complexity 64819 64853 +34
============================================
Files 5307 5307
Lines 302718 302727 +9
Branches 43734 43736 +2
============================================
- Hits 218178 218134 -44
- Misses 66638 66670 +32
- Partials 17902 17923 +21 ☔ View full report in Codecov by Sentry. |
@@ -191,6 +191,15 @@ public ClusterTasksResult<Task> execute(ClusterState currentState, List<Task> jo | |||
currentState.getMetadata().custom(RepositoriesMetadata.TYPE) | |||
); | |||
|
|||
Optional<DiscoveryNode> remotePublicationDN = currentNodes.getNodes() |
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.
Do we need this remotePublicationDN separately? Can we append the condition in the remoteDN logic above ?
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.
Yes, there can be cases where the remotePublicationDN has additional repository (eg :- routingTable) as compared to remoteDN and both the nodes are present in the cluster.
❌ Gradle check result for dda859c: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
@@ -241,7 +271,7 @@ public ClusterTasksResult<Task> execute(ClusterState currentState, List<Task> jo | |||
} | |||
results.success(joinTask); | |||
} | |||
|
|||
RepositoriesMetadata repositoriesMetadata = new RepositoriesMetadata(new ArrayList<>(repositories.values())); |
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.
If repositoriesMetadata
is already being computed above why is it needed to compute again here using repositories map ?
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.
The metdata computed above is only for the individual ones (RemoteDN / RemotePublicationDN). Here we are combining the repositories from both the code paths and constructing a new metadata.
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.
There is a bit of duplication currently. Can we change to below and then use the repositoriesMetadata instead of created new repositoriesMetadata
.
if (remoteDN.isEmpty() && node.isRemoteStoreNode() || remotePublicationDN.isEmpty() && node.isRemoteStatePublicationEnabled()) {
repositoriesMetadata = remoteStoreNodeService.updateRepositoriesMetadata(
node,
existingrepositoriesMetadata
);
}
Other is a node is both a remote store and remote publication node, then the logic will be executed twice.
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.
Sure makes sense. updated the PR.
dda859c
to
4ac77b1
Compare
❌ Gradle check result for 4ac77b1: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
4ac77b1
to
0d05c92
Compare
❌ Gradle check result for 0d05c92: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
0d05c92
to
dee33e8
Compare
dee33e8
to
75032b7
Compare
❌ Gradle check result for 75032b7: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Description
When a node with publication repositories are configured, cluster-manager updates the repositories metadata in cluster-state after validation.
Related Issues
Resolves #16363
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.