Hi Michael, Chetan,

I absolutely agree that this code has to improve. Before the change it read

  if (blob instanceof BlobStoreBlob) {
    return blob.getBlobId();
  }

which is just as broken in IMHO and failed to write blobs in Oak2Oak migration scenarios.

I would consider to blob stores to be equal iff they contain the same blobs.

I would also consider two blobs to be equal iff they contain the same binary content, which is also not the contract we use for BlobStoreBlob.

On 22.07.15 10:17, Michael Dürig wrote:

On 22.7.15 5:39 , Chetan Mehrotra wrote:
Hi Manfred,

On Tue, Jul 21, 2015 at 10:58 PM,  <[email protected]> wrote:
+ if (bsbBlobStore != null && bsbBlobStore.equals(blobStore)) {
+                    return bsb.getBlobId();
+                }

Can we have a testcase for this scenario? So far we do not have
requirement to support equality for BlobStore instance. So would like
to understand the usecase preferably with a testcase. May be the
problem affect SegmentNodeStore also (not sure though)

I double this! Please use other means for checking the origin of a blob. Equality is not the right thing here. I would consider to blob stores to be equal iff they contain the same blobs. But then above condition would be wrong.

Michael

Reply via email to