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

improve: use optimistic locking to avoid concurrency problem in admin… #2216

Merged
merged 3 commits into from
Sep 18, 2020

Commits on Sep 17, 2020

  1. improve: use optimistic locking to avoid concurrency problem in admin…

    … PATCH APIs.
    
    There is a potential concurrency problem in all admin PATCH APIs when
    two patch requests come in simultaneously, in such case, the patched
    result of the first applied request will be overridden, also the
    probability is tidy, but from the perspective of software's robust,
    that's not what we wanna to see.
    
    In this commit, we use the optimistic locking to avoid this problem, for
    the example aforementioned, the second PATCH request will failure, and
    it's up to the user to retry this PATCH request again.
    
    The optimistic locking mechanism in ETCD v3 APIs is showed by it's
    transcation mechanism.
    
    Signed-off-by: tokers <zchao1995@gmail.com>
    tokers committed Sep 17, 2020
    Configuration menu
    Copy the full SHA
    3758498 View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2020

  1. Configuration menu
    Copy the full SHA
    a980af0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8fe2f48 View commit details
    Browse the repository at this point in the history