-
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
Changing default no_master_block from write to metadata_write #3621
Conversation
❌ Gradle Check failure 7a0c38ece53ed99101223d7db4dbb857cac2ccee |
❌ Gradle Check failure 0dd18f7ee5200864aea25dec352efbf6b2c33434 |
❌ Gradle Check failure 4cde722784ba07b73eadd4cc8460438941cad466 |
❌ Gradle Check failure da3a0829b2fedbbb4b6bcd1262262629eebfb0f1 |
Signed-off-by: Gaurav Bafna <[email protected]>
All the failing tests are passing locally and are unrelated to the changes done .
can admin please rerun the test ? |
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.
Thanks @gbbafna we might need to modify this integ test to reflect the new behaviour, unsure how this is passing though
OpenSearch/server/src/internalClusterTest/java/org/opensearch/cluster/NoClusterManagerNodeIT.java
Lines 313 to 336 in 507f8cc
try { | |
clientToClusterManagerlessNode.prepareUpdate("test1", "1") | |
.setDoc(Requests.INDEX_CONTENT_TYPE, "field", "value2") | |
.setTimeout(timeout) | |
.get(); | |
fail("Expected ClusterBlockException"); | |
} catch (ClusterBlockException e) { | |
assertThat(System.currentTimeMillis() - now, greaterThan(timeout.millis() - 50)); | |
assertThat(e.status(), equalTo(RestStatus.SERVICE_UNAVAILABLE)); | |
} catch (Exception e) { | |
logger.info("unexpected", e); | |
throw e; | |
} | |
try { | |
clientToClusterManagerlessNode.prepareIndex("test1") | |
.setId("1") | |
.setSource(XContentFactory.jsonBuilder().startObject().endObject()) | |
.setTimeout(timeout) | |
.get(); | |
fail("Expected ClusterBlockException"); | |
} catch (ClusterBlockException e) { | |
assertThat(e.status(), equalTo(RestStatus.SERVICE_UNAVAILABLE)); | |
} |
This test sets the OpenSearch/server/src/internalClusterTest/java/org/opensearch/cluster/NoClusterManagerNodeIT.java Line 259 in 507f8cc
|
@Bukhtawar Does it need to be backported to |
/cc @shwetathareja |
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-1.x 1.x
# Navigate to the new working tree
cd .worktrees/backport-1.x
# Create a new branch
git switch --create backport/backport-3621-to-1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 07dc19def5e02ee8801e5c0d194ce0a569e5e310
# Push it to GitHub
git push --set-upstream origin backport/backport-3621-to-1.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-1.x Then, create a pull request where the |
Signed-off-by: Gaurav Bafna <[email protected]> (cherry picked from commit 07dc19d)
…#3756) Signed-off-by: Gaurav Bafna <[email protected]>
…arch-project#3621) Signed-off-by: Gaurav Bafna <[email protected]>
Signed-off-by: Gaurav Bafna [email protected]
Description
When there is no master in the cluster, or a node is partitioned off the cluster all writes see a 5xx, this leads to availability drop espl when there is a master quorum loss(writes do not need a quorum to succeed)
We can switch the default to only fail metadata writes as a part of index creation/dynamic mapping updates but let other writes succeed.
Issues Resolved
#3045
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.