Skip to content
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

[Transform] Add test logging regarding conflict on start #63383

Merged
merged 1 commit into from
Oct 7, 2020

Conversation

hendrikmuhs
Copy link

add extra logging for investigation of #63365

@hendrikmuhs hendrikmuhs added >test Issues or PRs that are addressing/adding tests v8.0.0 v7.10.0 :ml/Transform Transform labels Oct 7, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (:ml/Transform)

@@ -149,6 +149,14 @@ protected StartTransformResponse startTransformWithRetryOnConflict(String id, Re
try (RestHighLevelClient restClient = new TestRestHighLevelClient()) {
return restClient.transform().startTransform(new StartTransformRequest(id), options);
} catch (ElasticsearchStatusException e) {
logger.warn(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we log the whole exception's stack trace by supplying e as an argument to warn?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided against that because toString() lacks important information, e.g. it misses the status code and other details.

Note that after 10 retries, we get a stack trace.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, got it.

Copy link
Contributor

@przemekwitek przemekwitek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -149,6 +149,14 @@ protected StartTransformResponse startTransformWithRetryOnConflict(String id, Re
try (RestHighLevelClient restClient = new TestRestHighLevelClient()) {
return restClient.transform().startTransform(new StartTransformRequest(id), options);
} catch (ElasticsearchStatusException e) {
logger.warn(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, got it.

@hendrikmuhs hendrikmuhs merged commit ef4aa1e into elastic:master Oct 7, 2020
@hendrikmuhs hendrikmuhs deleted the transform-#63365 branch October 7, 2020 08:16
hendrikmuhs pushed a commit that referenced this pull request Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:ml/Transform Transform >test Issues or PRs that are addressing/adding tests v7.10.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants