Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-13794

Fix short read protection logic for querying more rows

    XMLWordPrintableJSON

Details

    • Normal

    Description

      Discovered by benedict while reviewing CASSANDRA-13747:

      While reviewing I got a little suspicious of the modified line DataResolver :479, as it seemed that n and x were the wrong way around... and, reading the comment of intent directly above, and reproducing the calculation, they are indeed.

      This is probably a significant enough bug that it warrants its own ticket for record keeping, though I'm fairly agnostic on that decision.

      I'm a little concerned about our current short read behaviour, as right now it seems we should be requesting exactly one row, for any size of under-read, which could mean extremely poor performance in case of large under-reads.

      I would suggest that the outer unconditional Math.max is a bad idea, has been (poorly) insulating us from this error, and that we should first be asserting that the calculation yields a value >= 0 before setting to 1.

      Attachments

        Issue Links

          Activity

            People

              aleksey Aleksey Yeschenko
              benedict Benedict Elliott Smith
              Aleksey Yeschenko
              Benedict Elliott Smith
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: