We're updating the issue view to help you get more done. 

Current DB locking mechanism is not sufficient in edge cases

Description

It's difficult to reproduce the error, but the gist of it should go like this:
say we have script_A and script B.

In script_A we do (t1-t5 are the times when each command happens):

1 2 3 d = client.node_instance.get(n_id).runtime_properties # t1 d[aaa] = bbb # t2 client.node_instance.update_runtime_properties(n_id, d) # t5

while in script_B we do:

1 2 3 d = client.node_instance.get(n_id).runtime_properties # t2 d[ccc] = ddd # t3 client.node_instance.update_runtime_properties(n_id, d) # t4

Because the locking only happens for the duration of the REST call, the update in script_A will override the changes that script_A made.

Possible solution is returning to optimistic locking with versions.

Status

Assignee

Pavel Brodsky

Reporter

Pavel Brodsky

Labels

None

Severity

None

Bug Type

None

Target Version

None

Severity

None

Fix versions

Affects versions

4.1
4.0.1
4.0.0