Skip to content

Add test with ERR_INJs for reproducing dirty reads #26

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

Open
ligurio opened this issue Sep 25, 2020 · 1 comment
Open

Add test with ERR_INJs for reproducing dirty reads #26

ligurio opened this issue Sep 25, 2020 · 1 comment
Labels

Comments

@ligurio
Copy link
Member

ligurio commented Sep 25, 2020

tarantool/tarantool#5208 (comment)

Fault injection на dirty read попробовать в тестах Jepsen.

  1. Обязательно Debug сборка Тарантул.
  2. В отдельном файбере ставим ERRINJ_WAL_DELAY и за ним запись в спейс - этот файбер повиснет после добавления записи
  3. В исходном файбере читаем то, что вставляли в п.2
  4. В исходном файбере (последовательно) выставляем ERRINJ_WAL_WRITE_DISK и снимаем ERRINJ_WAL_DELAY - получаем откат и п.3 становится грязным чтением

пример (сорри за лапидарность):

box.cfg{} box.schema.create_space('t'):create_index('p')
f1=require('fiber').new(function() box.error.injection.set('ERRINJ_WAL_DELAY', true) box.space.t:insert{3} end)
box.space.t:select{}
---
- - [3]
...
box.error.injection.set('ERRINJ_WAL_WRITE_DISK', true)
box.error.injection.set('ERRINJ_WAL_DELAY', false)
box.space.t:select{}
---
- []
...
ligurio added a commit that referenced this issue Oct 21, 2020
ligurio added a commit that referenced this issue Oct 21, 2020
clock-package: jepsen/src/jepsen/nemesis/combined.clj
clock-nemesis: jepsen/src/jepsen/nemesis/time.clj

Closes #26
@ligurio ligurio added the queue label Apr 5, 2021
@ligurio ligurio changed the title Add internal Tarantool ERR_INJs Add test with ERR_INJs for reproducing dirty reads Apr 5, 2021
@ligurio
Copy link
Member Author

ligurio commented Apr 5, 2021

Test requires Clojure connector because uses Lua commands that cannot be implemented in SQL (for example operations with fiber). We have plans to implement Clojure connector that allows to send any Lua commands to Tarantool instances (see #53), but it is not a nearest future.

@ligurio ligurio removed the queue label Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant