mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-28 20:27:03 +00:00
Whereas result_set::visit() passes all the rows the the visitor and returns void, this patch introduces a method visit_gently() that returns a future, and may yield before visiting each row. This method will be used in the next patch to allow Alternator, which used visit() to convert a result_set into JSON format, to potentially yield between rows and avoid large stalls when converting a large result set. Note that I decided to add the yield points in the new visit_gently() between rows - not between each cell. Many places in our code (including the memtable) already work on a per-row basis and do not yield in the middle of a row, so it won't really be helpful to do this either. But if we'll want, we will still be able to modify visit_gently() later to be even more gentle, and yield between individual cells. The callers shouldn't know or care. Signed-off-by: Nadav Har'El <nyh@scylladb.com>
8.4 KiB
8.4 KiB