Hey all,
We're introducing a change to the Shared Storage API in M138: sharedStorage.batchUpdate().
Batch update
Starting from M138 all updates within a batchUpdate() call will be executed as a single unit of work. If any method fails, none of them will be committed.
You can only apply the withLock option for batchUpdate() to the entire batch. Applying withLock to any individual method object within the batch throws an exception.
sharedStorage.batchUpdate([
new SharedStorageSetMethod('key1', 'value1', {withLock:'lock'}), //throws exception
new SharedStorageSetMethod('key2', 'value2')
], { withLock: 'modify-lock' });
We’ve updated the Shared Storage Implementation documentation to reflect these changes and provide additional details on using batchUpdate() and the Web Locks API.