This is an automated email from the ASF dual-hosted git repository.

nsabonyi pushed a commit to branch support/nifi-1.x
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/support/nifi-1.x by this push:
     new 6cad69d5e1 NIFI-11987: Set read buffer size in PutAzureBlobStorage_v12
6cad69d5e1 is described below

commit 6cad69d5e1ccc393dbebe800767387768abdb04e
Author: Peter Turcsanyi <[email protected]>
AuthorDate: Thu Aug 24 00:10:10 2023 +0200

    NIFI-11987: Set read buffer size in PutAzureBlobStorage_v12
    
    Increased the read buffer size in order to avoid OOME due to too many 
buffer allocations (exceeding vm.max_map_count on Linux).
    
    Backported
    This closes #7640
    
    Signed-off-by: Nandor Soma Abonyi <[email protected]>
    (cherry picked from commit 68983cef42d5212a7023e6cf907c8cb704f0c76d)
---
 .../apache/nifi/processors/azure/storage/PutAzureBlobStorage_v12.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/PutAzureBlobStorage_v12.java
 
b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/PutAzureBlobStorage_v12.java
index 2e7e8bd80d..f005800873 100644
--- 
a/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/PutAzureBlobStorage_v12.java
+++ 
b/nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/PutAzureBlobStorage_v12.java
@@ -199,7 +199,7 @@ public class PutAzureBlobStorage_v12 extends 
AbstractAzureBlobProcessor_v12 impl
                         .map(FileResource::getInputStream)
                         .orElseGet(() -> session.read(sourceFlowFile))
                 ) {
-                    final BlobParallelUploadOptions blobParallelUploadOptions 
= new BlobParallelUploadOptions(toFluxByteBuffer(sourceInputStream));
+                    final BlobParallelUploadOptions blobParallelUploadOptions 
= new BlobParallelUploadOptions(toFluxByteBuffer(sourceInputStream, 
BlobClient.BLOB_DEFAULT_UPLOAD_BLOCK_SIZE));
                     
blobParallelUploadOptions.setRequestConditions(blobRequestConditions);
                     Response<BlockBlobItem> response = 
blobClient.uploadWithResponse(blobParallelUploadOptions, null, Context.NONE);
                     BlockBlobItem blob = response.getValue();

Reply via email to