You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by GitBox <gi...@apache.org> on 2021/07/28 00:22:46 UTC

[GitHub] [samza] lakshmi-manasa-g commented on a change in pull request #1511: Samza-2665: AzureBlob SystemProducer: stop block upload retrying when InterruptedException is thrown

lakshmi-manasa-g commented on a change in pull request #1511:
URL: https://github.com/apache/samza/pull/1511#discussion_r677886094



##########
File path: samza-azure/src/main/java/org/apache/samza/system/azureblob/avro/AzureBlobOutputStream.java
##########
@@ -335,6 +335,11 @@ public void run() {
             // StageBlock generates exception on Failure.
             stageBlock(blockIdEncoded, outputStream, blockSize);
             break;
+          } catch (InterruptedException e) {
+            String msg = "Upload block for blob: " + blobAsyncClient.getBlobUrl().toString()
+                + " failed for blockid: " + blockId + " due to InterruptedException ";
+            LOG.error(msg, e);
+            throw new AzureException("InterruptedException encountered during block upload. Will not retry.", e);

Review comment:
       original idea of retry was to deal with azure blob storage connection issues. 
   
   Now the user of AzureBlobSystemProducer has a need where they want to interrupt the thread themselves if it doesnt stop within a set period of time (stop on thread invoked by them again). In such a scenario, they expect the thread to be killed immediately and producer bubble up the exception so that they can handle the exception in an appropriate manner. since they are dealing at the thread level and not producer level, it becomes hard for them to identify the producer of the thread and handle producer exceptions.




-- 
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@samza.apache.org

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