markrmiller commented on code in PR #53:
URL: https://github.com/apache/solr-sandbox/pull/53#discussion_r1160803458


##########
crossdc-consumer/src/main/java/org/apache/solr/crossdc/consumer/KafkaCrossDcConsumer.java:
##########
@@ -220,14 +285,97 @@ boolean pollAndProcessRequests() {
     return true;
   }
 
+  public void sendBatch(UpdateRequest solrReqBatch, 
ConsumerRecord<String,MirroredSolrRequest> lastRecord, WorkUnit workUnit) {
+    UpdateRequest finalSolrReqBatch = solrReqBatch;
+    Future<?> future = executor.submit(() -> {
+      IQueueHandler.Result<MirroredSolrRequest> result = 
messageProcessor.handleItem(new MirroredSolrRequest(finalSolrReqBatch));
+      try {
+        processResult(lastRecord, result);
+      } catch (MirroringException e) {
+        // We don't really know what to do here
+        log.error("Mirroring exception occurred while resubmitting to Kafka. 
We are going to stop the consumer thread now.", e);

Review Comment:
   This is from the original code we contributed, but it should be that we 
failed sending to solr and we failed re queing to Kafka, so it seems everything 
is down.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to