[
https://issues.apache.org/jira/browse/OAK-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15701521#comment-15701521
]
Chetan Mehrotra commented on OAK-4903:
--------------------------------------
[~amitjain] Overall approach looks fine. Few comments
# Would be better to break this in 2 parts or sub tasks
## Changes in BlobStore logic to introduce the new API
## Change in oak-lucene to make use of new API
# We can possibly ignore the second else
{noformat}
+ private Blob writeBlob(InputStream in) throws IOException {
+ if (blobStore != null) {
+ if (blobStore instanceof TypedBlobStore && !ENABLE_AYNC_DS) {
+ return new BlobStoreBlob(blobStore, ((TypedBlobStore)
blobStore)
+ .writeBlob(in, new
BlobOptions().setUpload(SYNCHRONOUS)));
+ } else {
+ return new BlobStoreBlob(blobStore,
blobStore.writeBlob(in));
+ }
+ } else {
+ return file.createBlob(in);
+ }
+ }
{noformat}
# TypedBlobStore, TypedDataStore - Can we avoid at least TypedBlobStore and
introduce the method in BlobStore itself. Default implementation would just
ignore the options passed. Currently we have many BlobStore interfaces
BlobStore, GarbageCollectableBlobStore, SplitBlobStore. So would like to avoid
a new interface for this and have the logic check for instanceof. It might have
a broad impact but I think that should be ok
> Async uploads in S3 causes issues in a cluster
> ----------------------------------------------
>
> Key: OAK-4903
> URL: https://issues.apache.org/jira/browse/OAK-4903
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: blob
> Reporter: Amit Jain
> Assignee: Amit Jain
> Priority: Critical
> Fix For: 1.6
>
> Attachments: OAK_4903.patch
>
>
> S3DataStore and CachingFDS through the CachingDataStore enable async uploads.
> This causes problems in clustered setups where uploads can sometimes be
> visible after a delay. During this time any request for the corresponding
> asset/file would return errors.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)