-
Notifications
You must be signed in to change notification settings - Fork 24.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
Track fetch exceptions for shard follow tasks #33047
Conversation
This commit adds tracking and reporting for fetch exceptions. We track fetch exceptions per fetch, keeping track of up to the maximum number of concurrent fetches. With each failing fetch, we associate the from sequence number with the exception that caused the fetch. We report these in the CCR stats endpoint, and add some testing for this tracking.
Pinging @elastic/es-distributed |
Here is what a version of the response from this API looks like:
Note that I have added a |
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
@@ -166,7 +166,7 @@ public Ccr(final Settings settings) { | |||
ShardFollowTask::fromXContent), | |||
|
|||
// Task statuses | |||
new NamedXContentRegistry.Entry(ShardFollowNodeTask.Status.class, new ParseField(ShardFollowNodeTask.Status.NAME), | |||
new NamedXContentRegistry.Entry(ShardFollowNodeTask.Status.class, new ParseField(ShardFollowNodeTask.Status.STATUS_PARSER_NAME), |
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.
this line is too long, causing a check style violation
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. I pushed 477c3bf.
@@ -72,4 +72,9 @@ protected boolean supportsUnknownFields() { | |||
protected ToXContent.Params getToXContentParams() { | |||
return ToXContent.EMPTY_PARAMS; | |||
} | |||
|
|||
protected boolean assertToXContentEquivalence() { |
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.
Ah this was just missing in this base class. It does exist in the AbstractXContentTestCase
base class.
Should we add this change back into master / 6.x separately after this PR is merged or just wait for when the ccr branches are merged? I have no strong opinion here.
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.
We discussed this offline. We will keep this in this branch for now, and it will come to 6.x/master when we integrate there.
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.
@@ -224,6 +241,7 @@ private void sendShardChangesRequest(long from, int maxOperationCount, long maxR | |||
synchronized (ShardFollowNodeTask.this) { | |||
totalFetchTimeMillis += TimeUnit.NANOSECONDS.toMillis(relativeTimeProvider.getAsLong() - startTime); | |||
numberOfSuccessfulFetches++; | |||
fetchExceptions.remove(from); |
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.
👍 to the approach to keep track of exceptions by from seqno in a fixed size linked hashmap.
This PR needs #33113 first. |
* ccr: (71 commits) Make CCR QA tests build again (elastic#33113) Add hook to skip asserting x-content equivalence (elastic#33114) Muted testListenersThrowingExceptionsDoNotCauseOtherListenersToBeSkipped [Rollup] Move getMetadata() methods out of rollup config objects (elastic#32579) fixed not returning response instance Muted testEmptyAuthorizedIndicesSearchForAllDisallowNoIndices Update Google Cloud Storage Library for Java (elastic#32940) Remove unsupported Version.V_5_* (elastic#32937) Required changes after merging in master branch. [DOCS] Add docs for Application Privileges (elastic#32635) Add versions 5.6.12 and 6.4.1 Do NOT allow termvectors on nested fields (elastic#32728) [Rollup] Return empty response when aggs are missing (elastic#32796) [TEST] Add some ACL yaml tests for Rollup (elastic#33035) Move non duplicated actions back into xpack core (elastic#32952) Test fix - GraphExploreResponseTests should not randomise array elements Closes elastic#33086 Use `addIfAbsent` instead of checking if an element is contained TESTS: Fix Random Fail in MockTcpTransportTests (elastic#33061) HLRC: Fix Compile Error From Missing Throws (elastic#33083) [DOCS] Remove reload password from docs cf. elastic#32889 ...
@elasticmachine test this please |
This commit adds tracking and reporting for fetch exceptions. We track fetch exceptions per fetch, keeping track of up to the maximum number of concurrent fetches. With each failing fetch, we associate the from sequence number with the exception that caused the fetch. We report these in the CCR stats endpoint, and add some testing for this tracking.
This commit adds tracking and reporting for fetch exceptions. We track fetch exceptions per fetch, keeping track of up to the maximum number of concurrent fetches. With each failing fetch, we associate the from sequence number with the exception that caused the fetch. We report these in the CCR stats endpoint, and add some testing for this tracking.
Relates #30086