You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Matt Ryan (Jira)" <ji...@apache.org> on 2019/08/23 21:30:00 UTC

[jira] [Commented] (OAK-8574) Minimize network calls required when completing direct upload

    [ https://issues.apache.org/jira/browse/OAK-8574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16914642#comment-16914642 ] 

Matt Ryan commented on OAK-8574:
--------------------------------

Note:  A fix for OAK-8575 would further reduce the number of API calls by one for both cases.

> Minimize network calls required when completing direct upload
> -------------------------------------------------------------
>
>                 Key: OAK-8574
>                 URL: https://issues.apache.org/jira/browse/OAK-8574
>             Project: Jackrabbit Oak
>          Issue Type: Technical task
>          Components: blob-cloud, blob-cloud-azure
>    Affects Versions: 1.16.0, 1.10.4
>            Reporter: Matt Ryan
>            Assignee: Matt Ryan
>            Priority: Major
>
> The {{completeHttpUpload()}} in the cloud data store backends can be improved in terms of quantity of cloud storage service API calls.
> Suggestions include:
>  * Try a single {{getRecord()}} call at the beginning instead of calling {{exists()}}.  If an exception is thrown, catch it - this means the record doesn't exist and can be written.  If a record is returned, we don't write - and instead return this record.
>  * Don't check for existence after writing the record; instead assume that the record is written correctly if no error or exception from SDK.  Verify this behavior in unit tests.
>  * After writing the record, construct the record directly instead of calling {{getRecord()}} to do it.
> This removes two network API calls if the record is written and one if the record already exists.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)