Source:
<code>private void onChunkOperationComplete(GetChunk chunk) { if (chunk.getChunkException() != null) { setOperationException(chunk.getChunkException()); } if (chunk == firstChunk) { if (operationCallbackInvoked.compareAndSet(false, true)) { Exception e = getOperationException(); if (options.getChunkIdsOnly) { operationCompleted = true; List<StoreKey> chunkIds = e == null && compositeBlobInfo != null ? compositeBlobInfo.getKeys() : null; operationResult = new GetBlobResultInternal(null, chunkIds); } else { long timeElapsed = time.milliseconds() - submissionTimeMs; if (isEncrypted) { routerMetrics.getEncryptedBlobOperationLatencyMs.update(timeElapsed); } else { routerMetrics.getBlobOperationLatencyMs.update(timeElapsed); } if (e == null) { if (blobInfo != null) { if (blobInfo.getBlobProperties().getBlobSize() != totalSize) { if (compositeBlobInfo == null) { routerMetrics.simpleBlobSizeMismatchCount.inc(); logger.debug("Blob size mismatch for simple blob: {}", getBlobIdStr()); } else { routerMetrics.compositeBlobSizeMismatchCount.inc(); logger.debug("Blob size mismatch for composite blob: {}", getBlobIdStr()); } <START> blobInfo.getBlobProperties().setBlobSize(totalSize); <END> } } if (options.getBlobOptions.getOperationType() != GetBlobOptions.OperationType.BlobInfo) { blobDataChannel = new BlobDataReadableStreamChannel(); } else { operationCompleted = true; } operationResult = new GetBlobResultInternal(new GetBlobResult(blobInfo, blobDataChannel), null); } else { blobDataChannel = null; operationResult = null; routerMetrics.onGetBlobError(e, options, isEncrypted); } } NonBlockingRouter.completeOperation(null, getOperationCallback, operationResult, e); } } chunk.postCompletionCleanup(); if (blobDataChannel != null) { blobDataChannel.maybeWriteToChannel(); } }</code><technical_language>if blob is simple encrypted ended in this scenario. I understand checked for this before, here, this check for case error out (and metrics reflect well?)</technical_language>

Target:
private void onChunkOperationComplete(GetChunk chunk) { if (chunk.getChunkException() != null) { setOperationException(chunk.getChunkException()); } if (chunk == firstChunk) { if (operationCallbackInvoked.compareAndSet(false, true)) { Exception e = getOperationException(); if (options.getChunkIdsOnly) { operationCompleted = true; List<StoreKey> chunkIds = e == null && compositeBlobInfo != null ? compositeBlobInfo.getKeys() : null; operationResult = new GetBlobResultInternal(null, chunkIds); } else { long timeElapsed = time.milliseconds() - submissionTimeMs; if (isEncrypted) { routerMetrics.getEncryptedBlobOperationLatencyMs.update(timeElapsed); } else { routerMetrics.getBlobOperationLatencyMs.update(timeElapsed); } if (e == null) { if (blobInfo != null) { if (blobInfo.getBlobProperties().getBlobSize() != totalSize) { if (compositeBlobInfo != null) { routerMetrics.compositeBlobSizeMismatchCount.inc(); logger.debug("Blob size mismatch for composite blob: {}", getBlobIdStr()); } else if (blobInfo.getBlobProperties().isEncrypted()) { routerMetrics.simpleEncryptedBlobSizeMismatchCount.inc(); logger.debug("Blob size mismatch for simple encrypted blob: {}", getBlobIdStr()); } else { routerMetrics.simpleUnencryptedBlobSizeMismatchCount.inc(); logger.warn("Blob size mismatch for simple unencrypted blob (should not happen): {}", getBlobIdStr()); } blobInfo.getBlobProperties().setBlobSize(totalSize); } } if (options.getBlobOptions.getOperationType() != GetBlobOptions.OperationType.BlobInfo) { blobDataChannel = new BlobDataReadableStreamChannel(); } else { operationCompleted = true; } operationResult = new GetBlobResultInternal(new GetBlobResult(blobInfo, blobDataChannel), null); } else { blobDataChannel = null; operationResult = null; routerMetrics.onGetBlobError(e, options, isEncrypted); } } NonBlockingRouter.completeOperation(null, getOperationCallback, operationResult, e); } } chunk.postCompletionCleanup(); if (blobDataChannel != null) { blobDataChannel.maybeWriteToChannel(); } }