Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-18055

Releasing L2 cache HFileBlocks before shipped() when switching from pread to stream causes result corruption

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: regionserver, Scanners
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      In HBASE-17917 tries to switch from pread to stream read when a specific size of bytes are read. So in order to switch over, it closes the existing scanners and creates a new scanners with pread=false.
      When we close the exisitng scanners - if the blocks are served from offheap cache we will decrement the ref count on those blocks and if it becomes zero we make the block ready for eviction. Then there is a chance that the result could be corrupted if new blocks occupy the cache. So the expectation was that till the RPC call completes the response we will hold on to the blocks that are referred by the scan. (except the last one). So trying to switch over to stream read will break this expectation and hence TestBlockEvictionfromclient fails.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Apache9 Duo Zhang
                Reporter:
                ram_krish ramkrishna.s.vasudevan
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: