jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig (JIRA) <j...@apache.org>
Subject [jira] [Comment Edited] (OAK-5253) Optimize AbstractBlob#equal to not do content equals when possible
Date Mon, 12 Dec 2016 10:19:58 GMT

    [ https://issues.apache.org/jira/browse/OAK-5253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15741363#comment-15741363
] 

Michael Dürig edited comment on OAK-5253 at 12/12/16 10:19 AM:
---------------------------------------------------------------

I share [~jsedding]'s concern. I think it is fine to return {{true}} if the blob ids are equal.
Otherwise we probably still have to delegate to {{AbstractBlob.equals()}}. Fully relying on
the blob id for identity is not correct and {{BlobStoreBlob.equals()}} seems even wrong to
that respect. 


was (Author: mduerig):
I share [~jsedding]'s concern. I think it is fine to return {{false}} if the blob ids differ.
Otherwise we probably still have to delegate to {{AbstractBlob.equals()}}. Fully relying on
the blob id for identity is not correct and {{BlobStoreBlob.equals()}} seems even wrong to
that respect. 

> Optimize AbstractBlob#equal to not do content equals when possible
> ------------------------------------------------------------------
>
>                 Key: OAK-5253
>                 URL: https://issues.apache.org/jira/browse/OAK-5253
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: blob
>            Reporter: Amit Jain
>            Assignee: Amit Jain
>         Attachments: OAK-5253.1.patch
>
>
> AbstractBlob#equals tries to match content when length is equal and content identities
is not null and different. Matching content triggers an expensive download of binaries for
S3DataStore.
> Since, right now the content identity is the content hash the check can be short -circuited
when the content identities is not null and not equal to return false.
> This can be revisited if we change the identity to something different.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message