You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/06/22 13:57:19 UTC

[GitHub] [pulsar] fantapsody commented on a diff in pull request #16177: [improve][es-sink] Add error log for failed bulk records in ES sink

fantapsody commented on code in PR #16177:
URL: https://github.com/apache/pulsar/pull/16177#discussion_r903780892


##########
pulsar-io/elastic-search/src/main/java/org/apache/pulsar/io/elasticsearch/ElasticSearchClient.java:
##########
@@ -73,9 +73,16 @@ public void afterBulk(long executionId, List<BulkProcessor.BulkOperationRequest>
                 }
                 int index = 0;
                 for (BulkProcessor.BulkOperationResult result: results) {
-                    final Record record = bulkOperationList.get(index++).getPulsarRecord();
+                    final Record<?> record = bulkOperationList.get(index++).getPulsarRecord();
                     if (result.isError()) {
                         record.fail();
+
+                        log.warn("Bulk request id={} failed, message id=[{}] index={} error={}", executionId,

Review Comment:
   That makes sense. Please take another look.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org