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

functional-tester: txn stresser #8293

Closed
heyitsanthony opened this issue Jul 20, 2017 · 2 comments
Closed

functional-tester: txn stresser #8293

heyitsanthony opened this issue Jul 20, 2017 · 2 comments

Comments

@heyitsanthony
Copy link
Contributor

Bugs in the txn code can lead to inconsistencies among members distinct from bugs caused by only puts/gets, so it should be tested in the functional tester. Although the etcd-runner tests use txns in some places, the throughput/concurrency/txn complexity isn't enough.

Flat txns could be stressed via:

  1. Have a set of keys K (e.g., "/k0", "/k1", ..., "/k9")
  2. Choose random keys kA...kB from K
  3. Submit a txn If(kA.Version > 0, ..., kB.Version > 0).Then(Delete kA...kB).Else(Put kA...kB).

Nested txns stressing could assign a key per level:

If (kA.Version > 0) {
   Delete(kA)
   If (kB.Version > 0) {
      Delete(kB)
   } else {
      Put(kB)
   }
} else {
    Put(kA)
    If (kB.Version > 0) { ... }
}

Related: #8214

@xiang90
Copy link
Contributor

xiang90 commented Jul 23, 2017

  1. All client write requests are executed in one single thread non-concurrently.
  2. The only thing might happen concurrently with client writes is compaction.

We either violates 1, or there is a bug in 2.

Is there anything else missed?

@xiang90
Copy link
Contributor

xiang90 commented Jul 23, 2017

oh. or there is a bug in the recovery/restore logic.

@heyitsanthony heyitsanthony added this to the unplanned milestone Aug 1, 2017
@gyuho gyuho closed this as completed Jan 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants