tarantool / jepsen.tarantool

Jepsen tests for Tarantool
https://www.tarantool.io/en/
Other
7 stars 0 forks source link

Make spaces synchronous in a bank tests #105

Closed ligurio closed 2 years ago

ligurio commented 2 years ago

Accidentally option for enabling synchronous mode for spaces in bank tests was not used. It means that with Tarantool cluster we tested asynchronous replication that has lower consistency guarantess that synchronous (eventual consistency). This patch enables is_sync for all spaces used in bank tests.

For other tests option "is_sync" was enabled in commit "Make spaces used in tests synchronous" (dfb4d45d32baf175e457ae431899a0e8ca098c75).

Follows up #51

ligurio commented 2 years ago

In my understanding, the bank test does not become invalid for asynchronous (but transactional) replication. Tarantool's replication is transactional since 2.2.1: tarantool/tarantool#2798.

With asynchronous replication, you have eventual consistency, and it can be easily to reach a state when replica and leader have different balances on accounts (if we talk about bank test). History of operations would invalid in such case and test will fail. I don't see any reasons to test async replication due to low consistency guarantees and additional option to configuring it looks useless.

Totktonada commented 2 years ago

That's opinionated. You stated that we should test only the simplest (and slowest) configuration, not the most common one that is used in all real applications (atm at least). I don't know, maybe the checker is not flexible enough or we should just selectively choose appropriate checks. Maybe you are right at the end and it worth to write our own checker. But I cannot agree that we should not test transactional asynchronous replication just because it may discard several latest transactions.

Another example. Should we test only wal_mode = 'fsync'? If you're use wal_mode = 'write', you have the same guarantees for a single instance test: it may discard a tail. I guess we just don't imitate machine halt with data that is not persisted to disk and reside only in a disk cache.