mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-28 04:06:59 +00:00
Currently the puppet reader will do an automatic (half) buffer-fill in the constructor. This makes it very hard to reason about when and how the action that was passed to it will be executed. Refactor it to take a list of actions and only execute those, no hidden buffer-fill anymore. No better proof is needed for this than the fact that the test which is supposed to test the multishard reader being destroyed with a pending read-ahead was silently broken (not testing what it should). This patch fixes this test too. Also fixed in this patch is the `pending` and `destroyed` fields of the remote control, tests can now rely on these to be correct and add additional checkpoints to ensure the test is indeed doing what it was intended to do.