[
https://issues.apache.org/jira/browse/OAK-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13961764#comment-13961764
]
Chetan Mehrotra commented on OAK-1667:
--------------------------------------
I thought about the compatibility part. The access to DataStore would always
work with both normal blobId and also with encoded blobId (where blobId has
length encoded in it).
The only place I can think of would cause issue is the Blob GC logic. So was
thinking if GC logic can be modified such that it can detect if the blobId is
encoded or not and does a comparison only on plain blobId (excluding the length
info) then one can enable this feature even for an existing system also. So we
add a method to {{BlobStore.getBlobId(String encodedId)}}. The default impl for
BlobStore would just return the blobId passed. For DataStoreBlobStore we return
the blobId part.
This also reduce the complexity of getAllIdentifiers as we just return the
blobId.
> Encode Blob length as part of blobId in DataStoreBlobStore
> ----------------------------------------------------------
>
> Key: OAK-1667
> URL: https://issues.apache.org/jira/browse/OAK-1667
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: core
> Reporter: Chetan Mehrotra
> Assignee: Chetan Mehrotra
> Priority: Minor
> Fix For: 1.1
>
> Attachments: OAK-1667.patch
>
>
> Currently to determine length of Blob in {{DataStoreBlobStore}} an explicit
> call is made to backing DataStore which in case of FileDataStore results in
> an OS call.
> As any file stored in DataStore is immutable and DataStore does not store the
> file in chunks the length information can be encoded in the BlobId itself and
> getLength call make use of that information
--
This message was sent by Atlassian JIRA
(v6.2#6252)