Uploaded image for project: 'Kudu'
  1. Kudu
  2. KUDU-853

Lifetime of KuduRowResults returned on KuduScanner::NextBatch is unclear and might cause segfaults or data corruption

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Private Beta
    • None
    • client
    • None

    Description

      KuduScanner::NextBatch takes a batch of KuduRowResult but doesn't clear it and instead adds to it. This seems to hint that previous KuduRowResults can be kept around and used later.

      However KuduRowResults point into the scan response directly, meaning that once the response is cleared (as it is in KuduScanner::NextBatch) previous KuduRowResults become invalid and their usage will likely cause us to crash or return corrupt data.

      We should:

      • 1st phase: document the current behavior and clear the vector on NextBatch().
      • 2nd phase: allow to copy the row results so that users can use them later.

      Attachments

        Activity

          People

            dralves David Alves
            dralves David Alves
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: