SAMZA-2699: AzureBlob SystemProducer: remove retries when uploading block as azure sdk does internal retries#1542
Merged
mynameborat merged 1 commit intoapache:masterfrom Oct 14, 2021
Conversation
…lock as azure sdk does internal retries
rmatharu-zz
reviewed
Oct 4, 2021
| ByteBuffer outputStream = ByteBuffer.wrap(compressedLocalByte, 0, blockSize); | ||
| metrics.updateCompressByteMetrics(blockSize); | ||
| LOG.info("{} Upload block start for blob: {} for block size:{}.", blobAsyncClient.getBlobUrl().toString(), blockId, blockSize); | ||
| metrics.updateAzureUploadMetrics(); |
Contributor
There was a problem hiding this comment.
should metric be updated after upload is complete, i.e. stageBlock?
Contributor
Author
There was a problem hiding this comment.
doing so now will actually make this change backwards incompatible.
the errors for upload are tracked separately here
ZitingShen
reviewed
Oct 4, 2021
samza-azure/src/main/java/org/apache/samza/system/azureblob/avro/AzureBlobOutputStream.java
Show resolved
Hide resolved
mynameborat
approved these changes
Oct 14, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Symptom: interrupted thread stays stuck for a long time when interrupted exception is wrapped in another exception.
Cause: retry several times for all exceptions during block upload. though InterruptedException was immediately bubbled up in #1511, when wrapped it is not bubbled.
Changes: remove retries at samza level since azure sdk does the retries.
Samza uses BlobServiceClientBuilder which uses RequestRetryOptions as the default retry policy and the RequestRetryOptions sets max retries to 4 with exponential backoff.
Tests: removing retry.
API changes: None
Usage/upgrade instructions: N/A
Backwards compatible: yes