Files
scylladb/service
Tomasz Grabiec 8fe06ad681 storage_proxy: Fix result reconciliation for memory-limitter induced short reads
This applies to the case when pages are broken by replicas based on
memory limits (not row or partition limits).

If replicas stop pages in the following places:

  replica1 = {
     row 1,
     <end-of-page>
     row 2
  }

  replica2 = {
    row 3
  }

The coordinator will reconcile the first page as:

  {
    row 1,
    row 3
  }

and row 2 will not be emitted at all in the following pages.

The coordinator should notice that replica1 returned a short read and
ignore everything past row 1 from other replicas, but it doesn't.

There is a logic to do this trimming, but it is done in
got_incomplete_information_across_partitions() which is executed only
for the partition for which row limits were exhausted.

Fix by running the logic unconditionally.

Fixes #9119

Tests:
  - unit (dev)
  - manual (2 node cluster, manual reproducer)

Message-Id: <20210802231539.156350-1-tgrabiec@scylladb.com>
2021-08-05 11:28:52 +03:00
..