Skip to Content
0

Trying to submit async merge operation with oDATA - object lock?

Feb 02 at 07:04 AM

41

avatar image

Hi,

I am running an JavaEE on my cloud platform and I am trying to update data in the ByD via OData. This is working well but if I try to this async I guess the object is locked and it fails.

Example:


Inventorytask: 123


Time consuming process:

Updating child 1 -> done, Updating child 2 -> done, Updating child 3 -> done, ...

-> works

Async try

Updating child 1, 2, 3, ... -> done

-> doesn't work

I have read about the eTag but I don't know if this can solve my problem.

Is there any possibiliyt to do it the async way or is this not possible because of the object lock?

Thanks.
Philipp

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Ankit Maskara
Feb 12 at 04:05 PM
0

Its always advised to acquire logical locks before any udpate operation to tackle inconsistent data in DB.

Now ETag will check for modification for same entity like checking consistency during update for child 1 with its own old values. By this any update on old data will be errored out and end user will be notified. Here I assume child 1 , child 2 , child 3 etc. are all related and an update on child 1 will lock the parent as well and so an update on child 2 cannot be done simultaneously since parent is locked by child 1. In such cases ETag will not help and you need to do it sequentially only.

Share
10 |10000 characters needed characters left characters exceeded