Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CmsClient should have a different type object for optimistic locking #697

Closed
peternied opened this issue Jun 5, 2024 · 1 comment
Closed
Labels
enhancement New feature or request

Comments

@peternied
Copy link
Member

In calls like

public Optional<CmsEntry.Index> updateIndexEntry(CmsEntry.Index newEntry, CmsEntry.Index lastEntry);

Two copies of the entry are passed it, this can lead to passing the old for new bugs

This is needed for optimistic locking which requires the current state of the document, by passing the full entry it includes the sequence number and the shard id which are both needed.

If there components were put into a different object type like ETag for the second parameter it would prevent passing the wrong parameter into the function call. I think we do need to clean this up - but lets attack this in future revisions.

Originally posted by @peternied in #693 (comment)

@peternied
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants