joerghoh commented on code in PR #2665:
URL: https://github.com/apache/jackrabbit-oak/pull/2665#discussion_r2627733720
##########
oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/AzureSegmentArchiveWriter.java:
##########
@@ -77,8 +79,10 @@ protected void doWriteArchiveEntry(RemoteSegmentArchiveEntry
indexEntry, byte[]
ioMonitor.beforeSegmentWrite(new File(blob.getBlobName()), msb, lsb,
size);
Stopwatch stopwatch = Stopwatch.createStarted();
try {
- blob.upload(BinaryData.fromBytes(Arrays.copyOfRange(data, offset,
offset + size)), true);
- blob.setMetadata(AzureBlobMetadata.toSegmentMetadata(indexEntry));
+ BinaryData binaryData = BinaryData.fromStream(new
ByteArrayInputStream(data, offset, size), (long) size);
Review Comment:
there's quite a bit of complexity behind this, can you just add a comment,
e.g.:
```suggestion
// upload the binary and set the metadata in a single call to
the blobstore
BinaryData binaryData = BinaryData.fromStream(new
ByteArrayInputStream(data, offset, size), (long) size);
```
--
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]