[
https://issues.apache.org/jira/browse/OAK-5902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16093067#comment-16093067
]
Francesco Mari commented on OAK-5902:
-------------------------------------
[~dulceanu], I think that we should avoid as much as possible to write our own
custom chunking logic. {{ChunkedInput}} and {{ChunkedWriteHandler}} look like a
good solution to this problem.
Regarding the problem about the hashing, I think that the simplest solution
would be to do let {{StandbyClient}} return an implementation of
{{InputStream}} that, while being consumed, computes its own hash internally.
Before the last chunk of that {{InputStream}} is returned, if the internally
computed hash and the expected hash differ, an exception is thrown. This will
result in an exception on the consumer's side, i.e. when the {{InputStream}} is
passed to the {{BlobStore}} for persisting it. The advantage of this solution
is that wraps the error checking under the {{InputStream}} API, and delegates
the handling of the error to the consumer, who is the only entity entitled to
provide a strategy for dealing with the error condition.
What about this approach?
> Cold standby should allow syncing of blobs bigger than 2.2 GB
> -------------------------------------------------------------
>
> Key: OAK-5902
> URL: https://issues.apache.org/jira/browse/OAK-5902
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: segment-tar
> Affects Versions: 1.6.1
> Reporter: Andrei Dulceanu
> Assignee: Andrei Dulceanu
> Priority: Minor
> Fix For: 1.8, 1.7.5
>
>
> Currently there is a limitation for the maximum binary size (in bytes) to be
> synced between primary and standby instances. This matches
> {{Integer.MAX_VALUE}} (2,147,483,647) bytes and no binaries bigger than this
> limit can be synced between the instances.
> Per comment at [1], the current protocol needs to be changed to allow sending
> of binaries in chunks, to surpass this limitation.
> [1]
> https://github.com/apache/jackrabbit-oak/blob/1.6/oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/standby/client/StandbyClient.java#L125
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)