Simple example of how to test Tarantool replication conflicts using Tarantool Cartridge test-helpers: https://www.tarantool.io/en/doc/latest/book/cartridge/cartridge_api/modules/cartridge.test-helpers/
Code based on https://github.com/tarantool/examples/tree/master/profile-storage
By default this example has so called "replication resolve trigger"
Line 65 in 3ba3e71
ATTENTION!!! Do not use my_trigger() function code in real applications. It's only for test purposes. Using this particular algorithm will lead to data inconsistency. In real applications you have to use more complicated algorithms based on external facts: external sequences, external timestamp and so on.
- Clone repository
- Go to root of repository
- Run: cartridge build
- Run: ./deps.sh
- Run: .rocks/bin/luatest -c