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

Evict blocks on split/merge; Avoid caching reference/hlinks if compaction is enabled

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0-alpha-3
    • 2.6.0, 3.0.0-alpha-4
    • None
    • None
    • Hide
      This modifies behaviour of block cache management as follows:
      1) Always evict blocks for the files from parent split region once it's closed, regardless of the "hbase.rs.evictblocksonclose" configured value;
      2) If compactions are enabled, doesn't cache blocks for the refs/link files under split daughters once these regions are opened;

      For #1 above, an additional evict_cache property has been added to the CloseRegionRequest protobuf message. It's default to false. Rolling upgrading cluster would retain the previous behaviour on RSes not yet upgraded.
      Show
      This modifies behaviour of block cache management as follows: 1) Always evict blocks for the files from parent split region once it's closed, regardless of the "hbase.rs.evictblocksonclose" configured value; 2) If compactions are enabled, doesn't cache blocks for the refs/link files under split daughters once these regions are opened; For #1 above, an additional evict_cache property has been added to the CloseRegionRequest protobuf message. It's default to false. Rolling upgrading cluster would retain the previous behaviour on RSes not yet upgraded.

    Description

      This change aims to improve block cache usage upon splits/merges. On a split/merge event the following main steps happen:

      1) parent regions are closed; 2) daughters are created and opened with refs/hlinks; 3) Compaction is triggered soon after the daughters get online;

      With "hbase.rs.evictblocksonclose" set to false, we keep all blocks for the closed regions in 1, then will try to load same blocks again on 2 (since we are using the refs/links for the cache key), just to throw it away and cache the compaction resulting file in 3. 

      If the block cache is close to its capacity, blocks from the compacted files in 3 will likely miss the cache.

      The proposal here is to always evict blocks for parent regions on a split/merge event, and also avoid caching blocks for refs/hlinks if compactions are enabled. 

      Attachments

        Issue Links

          Activity

            People

              wchevreuil Wellington Chevreuil
              wchevreuil Wellington Chevreuil
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: