Files
scylladb/cql3/result_set.hh
Nadav Har'El e24629a635 result_set: introduce visit_gently()
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>
2024-03-26 18:32:11 +02:00

8.4 KiB