Matt Ryan created OAK-8574: ------------------------------ Summary: 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: Improvement Components: blob-cloud, blob-cloud-azure Affects Versions: 1.10.4, 1.16.0 Reporter: Matt Ryan Assignee: Matt Ryan
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)