jepsen-io / jepsen

A framework for distributed systems verification, with fault injection
6.69k stars 710 forks source link

Why use txn only if the size of txn > 1? #487

Closed winddd closed 3 years ago

winddd commented 3 years ago

May I ask a question about why only enable transaction explicitly when the size of txn is larger than 1 in stolon test? My initial guess is that if the size =1, then transaction will be implicitly enabled by the database. But in the implementation of append micro-operation, the codes provide two possible ways:

  1. using on conflict
  2. using update, insert, update.

In the second way, from my understanding, it seems to use more than 1 SQL statements. Then implicit transaction won't be enabled for this transaction. But the codes still sets use-txn? to false. Thanks a lot!

aphyr commented 3 years ago

At most one of those [update, insert, update] statements actually executes.

winddd commented 3 years ago

At most one of those [update, insert, update] statements actually executes.

Oh, I see. Thanks!