Skip to content

Commit

Permalink
Readd log lines for first retryable error (#955)
Browse files Browse the repository at this point in the history
Summary:
We removed the error details from the logline in previous commit.
However, this log line is essential to our retry logic since we are
doing string matching to determine how worker is going to do the retry.

This commit is to add the first error back to the log line.

Test Plan: Build and verify the logline
  • Loading branch information
Xiaomeng Zhang authored Jan 28, 2021
1 parent a145e8f commit 7b6d9d7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ public ImportResult call() throws Exception {
success = result.getType() == ImportResult.ResultType.OK && errors.isEmpty();

if (!success) {
// No need to log out individual errors
// since IdempotentImportExecutor already logs them out
throw new IOException(
"Encountered errors in idempotentImportExecutor, forcing a retry");
"Problem with importer, forcing a retry, "
+ "first error: "
+ (errors.iterator().hasNext() ? errors.iterator().next() : "none"));
}

result = result.copyWithCounts(data.getCounts());
Expand Down

0 comments on commit 7b6d9d7

Please sign in to comment.