UNOMI-371 add optional support for optimistic concurrency control (if_seq_no)#200
UNOMI-371 add optional support for optimistic concurrency control (if_seq_no)#200lyogev wants to merge 1 commit intoapache:masterfrom
Conversation
|
@sergehuber I'm thinking that maybe to make this a more robust change we need to get the PersistenceService to return the new saved object whenever a save is triggered (changing the signature for all the save functions), WDYT? |
sergehuber
left a comment
There was a problem hiding this comment.
Thanks for the PR. I'm requesting a change on the name of a field because I'm afraid it's going to add confusion. Unfortunately I don't have a better name to provide at this point. Options maybe ?
| protected String itemType; | ||
| protected String scope; | ||
| protected Long version; | ||
| protected Map<String, Object> metadata = new HashMap<>(); |
There was a problem hiding this comment.
I'm having a problem with this name. We already have a MetadataItem class that has Metadata object associated with it. I'm afraid this name might cause confusion. I understand why it was introduced but I'm wondering if we could find another name for it ?
There was a problem hiding this comment.
@lyogev have you seen my previous message about the metadata name ? Once this is fixed we could merge this.
There was a problem hiding this comment.
Hi @sergehuber yes I've seen the comment and I will update, but we are adding more code here soon as we are already using this mode, and we discovered some more issues. will update soon
There was a problem hiding this comment.
Ok thanks for the feedback. Will probably merge this after 1.5.3 then.
|
I just realized I forgot to answer your question about the save methods. That's ok with me as long as we don't change any REST or GraphQL API endpoints. |
44003de to
52a0005
Compare
|
Hello @lyogev , due to other merges this PR now conflicts with the master. Could you fix it please ? Also for the metadata I could suggest we rename it to systemMetadata ? Thanks for your help and contribution. Regards, |
|
Hi @sergehuber , |
|
Closing this PR and moving to #223 |
When profiles are written at the same time (multiple events on the same profile for example, or segment updates during other segment updates) sometimes we are getting inconsistencies with the final profile.
This PR adds an optional flag to start using elasticsearch optimistic concurrency mechanism
This, in conjunction with the throwExceptions flag allows the client to be aware of such a case and retry if needed.