Assert no exceptions during state application#47090
Merged
DaveCTurner merged 2 commits intoelastic:masterfrom Sep 25, 2019
Merged
Assert no exceptions during state application#47090DaveCTurner merged 2 commits intoelastic:masterfrom
DaveCTurner merged 2 commits intoelastic:masterfrom
Conversation
Today we log and swallow exceptions during cluster state application, but such an exception should not occur. This commit adds assertions of this fact, and updates the Javadocs to explain it. Relates elastic#47038
Collaborator
|
Pinging @elastic/es-distributed |
original-brownbear
approved these changes
Sep 25, 2019
Contributor
original-brownbear
left a comment
There was a problem hiding this comment.
LGTM, this makes a lot of sense to me :)
original-brownbear
previously requested changes
Sep 25, 2019
Contributor
There was a problem hiding this comment.
Seems this needs some test removal/adjustment still though, tests that are simulating exceptions in the CS applier fail now:
FDE 25, 2019 10:43:28 COMME com.carrotsearch.randomizedtesting.RandomizedRunner$QueueUncaughtExceptionsHandler uncaughtException
WARNING: Uncaught exception in thread: Thread[elasticsearch[test_node][clusterApplierService#updateTask][T#1],5,TGRP-ClusterApplierServiceTests]
java.lang.AssertionError
at __randomizedtesting.SeedInfo.seed([FA241879CEA2DA83]:0)
at org.elasticsearch.cluster.service.ClusterApplierService.runTask(ClusterApplierService.java:452)
at org.elasticsearch.cluster.service.ClusterApplierService$UpdateTask.run(ClusterApplierService.java:176)
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:699)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:252)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:215)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Member
Author
|
Thanks @original-brownbear I would wait for a green CI run before looking too hard at this, in case it shakes out anything else. |
Member
Author
|
Failure is unrelated, I opened #47098. @elasticmachine please run elasticsearch-ci/1 |
original-brownbear
approved these changes
Sep 25, 2019
Contributor
original-brownbear
left a comment
There was a problem hiding this comment.
LGTM :)
It is a little weird though to test the case that we assert doesn't happen ever, but I can see how we still want to handle those exceptions properly and keep the coverage :)
DaveCTurner
added a commit
that referenced
this pull request
Sep 25, 2019
Today we log and swallow exceptions during cluster state application, but such an exception should not occur. This commit adds assertions of this fact, and updates the Javadocs to explain it. Relates #47038
DaveCTurner
added a commit
that referenced
this pull request
Sep 25, 2019
Today we log and swallow exceptions during cluster state application, but such an exception should not occur. This commit adds assertions of this fact, and updates the Javadocs to explain it. Relates #47038
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Today we log and swallow exceptions during cluster state application, but such
an exception should not occur. This commit adds assertions of this fact, and
updates the Javadocs to explain it.
Relates #47038