Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-1751

Perform aggregations, sorting, etc, in the preScannerNext instead of postScannerOpen

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      HBase retains a lease for every scanner. Then lease expires the scan will no longer (be allowed to) work. The leases guard against the client going away, and allow cleaning up resources if that happens.

      At various points HBase "suspends" the lease while the region server are working on behalf of this scanner, so that the lease won't expire even though the server is working on it.
      HBase does that during the scanning process. Crucially it suspends the leaser after the scanner is opened, before next() is issued on it.
      The outcome of all this is that Phoenix executes aggregates, sorts, etc, with the lease in place, and hence if these take a bit the lease can expire even though the server was working on it.

      Phoenix should do this work in preScannerNext, being careful that the precalculation is only performed once.

      I'll attach a sample patch soon.

      Attachments

        1. PHOENIX-1751-v2c.patch
          8 kB
          James R. Taylor
        2. PHOENIX-1751-0.98.patch
          13 kB
          James R. Taylor
        3. PHOENIX-1751.patch
          10 kB
          James R. Taylor
        4. PHOENIX-1751_v4.patch
          13 kB
          James R. Taylor
        5. PHOENIX-1751_v3.patch
          16 kB
          James R. Taylor
        6. 1751-WIP-v2b.patch
          8 kB
          James R. Taylor
        7. 1751-WIP-v2.txt
          6 kB
          Lars Hofhansl
        8. 1751-WIP.txt
          6 kB
          Lars Hofhansl

        Activity

          People

            larsh Lars Hofhansl
            larsh Lars Hofhansl
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: