-
Notifications
You must be signed in to change notification settings - Fork 30
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
Increment records/failed counter for failed writes #445
Conversation
...w/commons/src/main/java/com/datastax/oss/dsbulk/workflow/commons/metrics/MetricsManager.java
Show resolved
Hide resolved
@@ -234,6 +237,7 @@ public boolean execute() { | |||
statements | |||
.transform(this::executeStatements) | |||
.transform(queryWarningsHandler) | |||
.transform(failedWritesMonitor) |
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 was the root cause of the bug: the monitor that increments the records/failed
metric wasn't being invoked here, and so failed writes weren't being accounted for.
@@ -733,7 +738,7 @@ public Publisher<Publisher<Record>> read( | |||
assertStatus(status, STATUS_COMPLETED_WITH_ERRORS); | |||
assertThat(logs.getAllMessagesAsString()) | |||
.contains("completed with 11000 errors") | |||
.contains("Records: total: 100,000, successful: 90,000, failed: 10,000") | |||
.contains("Records: total: 100,000, successful: 89,000, failed: 11,000") |
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 bug report unveiled a flaw in this existing assertion.
I've now tested the new binary built from this branch, and can see console reporter correctly showing the number of failed operations. LGTM |
Fixes #444.