Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
aws-connector-4.3.0
-
None
Description
Problem
Currently, AWS sinks send batch write requests to endpoints.
On partial failure within the batch (only some records fail), we perform retries or fail the job, but we don't log the error returned.
private void handlePartiallyFailedRequest( PutRecordsResponse response, List<PutRecordsRequestEntry> requestEntries, Consumer<List<PutRecordsRequestEntry>> requestResult) { LOG.warn( "KDS Sink failed to write and will retry {} entries to KDS", response.failedRecordCount()); numRecordsOutErrorsCounter.inc(response.failedRecordCount()); if (failOnError) { getFatalExceptionCons() .accept(new KinesisStreamsException.KinesisStreamsFailFastException()); return; } List<PutRecordsRequestEntry> failedRequestEntries = new ArrayList<>(response.failedRecordCount()); List<PutRecordsResultEntry> records = response.records(); for (int i = 0; i < records.size(); i++) { if (records.get(i).errorCode() != null) { failedRequestEntries.add(requestEntries.get(i)); } } requestResult.accept(failedRequestEntries); }
What we want to do
We should log the reason for failure to assist user debugging.