dulceanu commented on a change in pull request #280:
URL: https://github.com/apache/jackrabbit-oak/pull/280#discussion_r586324298
##########
File path:
oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/DefaultSegmentWriter.java
##########
@@ -651,6 +657,17 @@ private RecordId internalWriteStream(@NotNull InputStream
stream) throws IOExcep
new ByteArrayInputStream(data, 0, n), stream));
return writeBlobId(blobId);
}
+
+ // handle case in which blob store is not configured and
+ // binariesInlineThreshold < Segment.MEDIUM_LIMIT
+ // store the binaries as small or medium sized value records
+
+ data = Arrays.copyOf(data, Segment.MEDIUM_LIMIT);
+ n += read(stream, data, n, Segment.MEDIUM_LIMIT - n);
+
+ if (n < Segment.MEDIUM_LIMIT) {
+ return writeValueRecord(n, data);
Review comment:
I added `DefaultSegmentWriterTest#testValueRecord` to specifically test
this part.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]