mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-22 09:30:45 +00:00
There is a bad interaction between may_need_paging() and query result size limiter. The former is trying to avoid the complexity of paged queries when the number of returned rows is going to be smaller than the page size. The latter uses the fact that paged queries need not return all requested rows to limit the size of a query results. Since may_need_paging() may turn a paged query into non-paged one as a side effect it disables the oversized result protection. This patch limits the cases when may_need_paging() disables paging to the situations when we know for sure that query result size limiter won't be needed, i.e.: the result is not going to contain more than one row. If the client knows for sure that the paging is not needed and the performance impact is worthwhile it can disable paging on its side. Otherwise, let's default to the safer behaviour. Fixes #3620. Message-Id: <20180925134431.24329-1-pdziepak@scylladb.com>