This is an automated email from the ASF dual-hosted git repository.
adulceanu pushed a commit to branch issues/OAK-10311
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
The following commit(s) were added to refs/heads/issues/OAK-10311 by this push:
new 7699ac150d OAK-10311 - Optimize SegmentBlob#equals for segment blobs
that originate from the same blob store Switched from content identity to blob
id in comparison
7699ac150d is described below
commit 7699ac150d78ee54d428389996f70120225ad6c6
Author: dulceanu <[email protected]>
AuthorDate: Wed Nov 15 11:57:39 2023 +0100
OAK-10311 - Optimize SegmentBlob#equals for segment blobs that originate
from the same blob store
Switched from content identity to blob id in comparison
---
.../src/main/java/org/apache/jackrabbit/oak/segment/SegmentBlob.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentBlob.java
b/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentBlob.java
index 25d525236a..9ab2ffea8d 100644
---
a/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentBlob.java
+++
b/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentBlob.java
@@ -199,8 +199,8 @@ public class SegmentBlob extends Record implements Blob {
if (FAST_EQUALS_SAME_BLOBSTORE) {
if (blobStore != null && this.blobStore.equals(that.blobStore)
&& this.isExternal() && that.isExternal()) {
- if (this.getContentIdentity() != null &&
that.getContentIdentity() != null) {
- return
this.getContentIdentity().equals(that.getContentIdentity());
+ if (this.getBlobId() != null && that.getBlobId() != null) {
+ return this.getBlobId().equals(that.getBlobId());
}
}
}