Commit Graph

3 Commits

Author SHA1 Message Date
罗泽轩
ab6e31fd63
test: clean unrun cases (#3356)
Those test may mislead people.
Also add a check to prevent skipping test by accident.

Signed-off-by: spacewander <spacewanderlzx@gmail.com>
2021-01-20 19:14:56 +08:00
Alex Zhang
dd6ee5e99f
improve: use optimistic locking to avoid concurrency problem in admin PATCH APIs. (#2216)
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>
2020-09-18 17:20:55 +08:00
Eric Shi
2b5ddbca2f
test: add test cases about the string id in service #1659 (#1750) 2020-06-22 12:55:58 +08:00