[ 
https://issues.apache.org/jira/browse/OAK-10311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julian Reschke updated OAK-10311:
---------------------------------
    Fix Version/s:     (was: 1.54.0)

> Optimize SegmentBlob#equals for segment blobs that originate from the same 
> blob store
> -------------------------------------------------------------------------------------
>
>                 Key: OAK-10311
>                 URL: https://issues.apache.org/jira/browse/OAK-10311
>             Project: Jackrabbit Oak
>          Issue Type: Story
>          Components: segment-tar
>    Affects Versions: 1.52.0
>            Reporter: Axel Hanikel
>            Priority: Major
>
> [SegmentBlob#equals|https://github.com/apache/jackrabbit-oak/blob/jackrabbit-oak-1.52.0/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentBlob.java]
>  can be optimized for blobs originating from the same external blob store: In 
> that case, SegmentBlob#getBlobId() can be used to determine if the blobs are 
> equal or not. That change should avoid falling back to a byte-by-byte 
> comparison if the two blobs have the same size, which can be very expensive 
> for larger blobs.
> The optimization should be placed behind a code/feature toggle or system 
> property and disabled by default. The reason is that the contract of 
> [Blob#getContentIdentity|https://github.com/apache/jackrabbit-oak/blob/cc0521e1cf8dc10ad7a8d41a9f2d3fd2905e5c9b/oak-api/src/main/java/org/apache/jackrabbit/oak/api/Blob.java#L80-L82]
>  does not mention the special case where Blobs reside in the same blob store. 
> As part of this story, integration and benchmark tests should be created to 
> demonstrate gains in performance and correct behavior. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to