Skip to content
New issue

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

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

Already on GitHub? # to your account

[Bug]: requests in a single txn do not execute in sequence #471

Closed
Tracked by #467
bsbds opened this issue Oct 8, 2023 · 1 comment
Closed
Tracked by #467

[Bug]: requests in a single txn do not execute in sequence #471

bsbds opened this issue Oct 8, 2023 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@bsbds
Copy link
Collaborator

bsbds commented Oct 8, 2023

The operations in a single txn should be executed sequentially. However in Xline, we don't check for conflicts inside a single txn, all commands result are based on the storage state before the txn is exected. This behaviour is inconsistent with etcd.

@bsbds bsbds changed the title Internal Jepsen internal anomaly Oct 8, 2023
@bsbds bsbds changed the title Jepsen internal anomaly [Bug]: requests in a single txn do not execute in sequence Nov 1, 2023
@bsbds
Copy link
Collaborator Author

bsbds commented Nov 2, 2023

Background

We have two stage execute and after_sync, however during a multi-request txn execution of these two stage, one executing child request does not see the effect of a previous executed child request.

Solution

To resolve this issue, an extra state during these stages is required. Let's call it TxnState. We create this temporary state every time when execting a txn request. For a put and delete_range request, we update the TxnState, and for a range or compare, we read from both the TxnState and current storage, and use the merged result for the request.

@Phoenix500526 Phoenix500526 added the bug Something isn't working label Nov 10, 2023
@bsbds bsbds added this to the v0.7.0 milestone Nov 22, 2023
@bsbds bsbds closed this as completed Aug 27, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants