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

Return error for txn condition not succeeded #441

Merged
merged 1 commit into from
Jun 24, 2021

Conversation

jschwinger233
Copy link
Member

@jschwinger233 jschwinger233 commented Jun 24, 2021

比如对 BatchUpdate 来说, 我们的 txn 是:

  1. if 所有 key 都存在, 且不等于新 value
  2. 则 put
  3. 否则 get

所以对于业务调用方, 比如 UpdateWorkloads, 成功更新 workloads meta 和事务条件的成功与否强相关, 所以这个 pr 对 txn response.Succeed 做了判断.

@jschwinger233
Copy link
Member Author

store.meta 里有五个方法返回了 TxnResponse, 其中只有 BatchUpdate / BatchCreate / Update 有这个问题

@jschwinger233 jschwinger233 changed the title [WIP] Return error for txn condition not succeeded Return error for txn condition not succeeded Jun 24, 2021
@CMGS CMGS merged commit 02fb1bf into projecteru2:master Jun 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants