[ 
https://issues.apache.org/jira/browse/HBASE-29644?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Anuj Sharma resolved HBASE-29644.
---------------------------------
    Resolution: Fixed

> Refresh_meta triggering compaction on user table
> ------------------------------------------------
>
>                 Key: HBASE-29644
>                 URL: https://issues.apache.org/jira/browse/HBASE-29644
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Shanmukha Haripriya Kota
>            Assignee: Anuj Sharma
>            Priority: Critical
>              Labels: pull-request-available
>
> *Steps to repro (Use docker setup: 
> [https://github.com/anmolnar/hbase-docker):]*
>  * Create table in active (do not execute refresh_meta yet on read-only)
> {code:java}
>  create 'test_sft', {NAME => 'colFam', CONFIGURATION => 
> {'hbase.store.file-tracker.impl' => 'FILE'}}{code}
>  * Insert 3 to 4 rows in the table, do flush after each insert to create 
> multiple HFiles.
> {code:java}
> put 'test_sft', 'row1', 'colFam:name', 'John Doe1'{code}
>  * List of HFiles:
> {noformat}
> % ls -la 
> tmp/data-store/hbase/data/default/test_sft/f940c3c652b5941154a81ece7bdbe889/colFam
> total 48
> drwxr-xr-x@ 6 anuj.sharma  staff   192  6 Oct 18:32 .
> drwxr-xr-x@ 4 anuj.sharma  staff   128  6 Oct 18:28 ..
> drwxr-xr-x@ 3 anuj.sharma  staff    96  6 Oct 18:32 .filelist
> -rw-r--r--@ 1 anuj.sharma  staff  5003  6 Oct 18:30 
> 0592645fee714be6913b46e64ffc4e54
> -rw-r--r--@ 1 anuj.sharma  staff  5003  6 Oct 18:32 
> 0e383a65b8b44884b5dc3127c3235bbf
> -rw-r--r--@ 1 anuj.sharma  staff  5003  6 Oct 18:29 
> 71fc8cdc10734c6786c583445bd0ae6e{noformat}
>  * .filelist content:
> {noformat}
> % cat 
> tmp/data-store/hbase/data/default/test_sft/f940c3c652b5941154a81ece7bdbe889/colFam/.filelist/f1.1759755531106
> ???̛3%
>  71fc8cdc10734c6786c583445bd0ae6e?'%
>  0592645fee714be6913b46e64ffc4e54?'%
>  0e383a65b8b44884b5dc3127c3235bbf?'?$%{noformat}
>  * Now execute refresh_meta on read-only cluster. You will see new file 
> created (Other files will get automatically deleted after sometime):
> {noformat}
> % ls -la 
> tmp/data-store/hbase/data/default/test_sft/f940c3c652b5941154a81ece7bdbe889/colFam
> total 64
> drwxr-xr-x@ 7 anuj.sharma  staff   224  6 Oct 18:36 .
> drwxr-xr-x@ 4 anuj.sharma  staff   128  6 Oct 18:28 ..
> drwxr-xr-x@ 4 anuj.sharma  staff   128  6 Oct 18:36 .filelist
> -rw-r--r--@ 1 anuj.sharma  staff  5003  6 Oct 18:30 
> 0592645fee714be6913b46e64ffc4e54
> -rw-r--r--@ 1 anuj.sharma  staff  5003  6 Oct 18:32 
> 0e383a65b8b44884b5dc3127c3235bbf
> -rw-r--r--@ 1 anuj.sharma  staff  5003  6 Oct 18:29 
> 71fc8cdc10734c6786c583445bd0ae6e
> -rw-r--r--@ 1 anuj.sharma  staff  5200  6 Oct 18:36 
> cc941ddf322a472f80601ff13535d7aa --> New file created post 
> refresh_meta{noformat}
>  * If we open the file it has something like hence I feel its a compacted 
> file:
> {noformat}
>  COMPACTION_EVENT_KEYjPBUF
>  71fc8cdc10734c6786c583445bd0ae6e
>  0e383a65b8b44884b5dc3127c3235bbf
>  0592645fee714be6913b46e64ffc4e54
>  
> {noformat}
>  
> In the log of region server you will see minor compactions are being 
> triggered after opening a new region on the read replica cluster. Investigate 
> and fix the ReadOnlyController.
> {code:java}
> 2025-10-06T22:16:13,552 INFO  
> [RS_OPEN_REGION-regionserver/hbase-docker-2:16020-0] 
> handler.AssignRegionHandler: Opened 
> t1,,1759788781868.60e54b8e10b9e2655bf1b2aca04e9a2f.
> 2025-10-06T22:16:13,556 INFO  
> [regionserver/hbase-docker-2:16020-shortCompactions-0] regionserver.HRegion: 
> Starting compaction of 60e54b8e10b9e2655bf1b2aca04e9a2f/cf1 in 
> t1,,1759788781868.60e54b8e10b9e2655bf1b2aca04e9a2f.
> 2025-10-06T22:16:13,557 INFO  
> [regionserver/hbase-docker-2:16020-shortCompactions-0] regionserver.HStore: 
> Starting compaction of 
> [file:/data-store/hbase/data/default/t1/60e54b8e10b9e2655bf1b2aca04e9a2f/cf1/3dc8900fdcf04883a6f03700cec86b92,
>  
> file:/data-store/hbase/data/default/t1/60e54b8e10b9e2655bf1b2aca04e9a2f/cf1/d136f2f138964f7f80732492995c55fe,
>  
> file:/data-store/hbase/data/default/t1/60e54b8e10b9e2655bf1b2aca04e9a2f/cf1/08d326c0525b44bb8d3745baf4932c02,
>  
> file:/data-store/hbase/data/default/t1/60e54b8e10b9e2655bf1b2aca04e9a2f/cf1/bac69e5664b5456ca787ca31e22e6b2d]
>  into 
> tmpdir=file:/data-store/hbase/data/default/t1/60e54b8e10b9e2655bf1b2aca04e9a2f/.tmp,
>  totalSize=19.4 K
> 2025-10-06T22:16:13,568 INFO  [HBase-Metrics2-1] 
> impl.GlobalMetricRegistriesAdapter: Registering 
> RegionServer,sub=TableRequests_Namespace_default_table_t1 Metrics about 
> Tables on a single HBase RegionServer
> 2025-10-06T22:16:13,657 INFO  
> [regionserver/hbase-docker-2:16020-shortCompactions-0] 
> throttle.PressureAwareThroughputController: 
> 60e54b8e10b9e2655bf1b2aca04e9a2f#cf1#compaction#0 average throughput is 0.06 
> MB/second, slept 0 time(s) and total slept time is 0 ms. 0 active operations 
> remaining, total limit is 50.00 MB/second
> 2025-10-06T22:16:13,771 INFO  
> [regionserver/hbase-docker-2:16020-shortCompactions-0] regionserver.HStore: 
> Completed compaction of 4 (all) file(s) in 
> 60e54b8e10b9e2655bf1b2aca04e9a2f/cf1 of 60e54b8e10b9e2655bf1b2aca04e9a2f into 
> c9189f98667f48a2a8fad2bd9d68187b(size=5.1 K), total size for store is 5.1 K. 
> This selection was in queue for 0sec, and took 0sec to execute.
> 2025-10-06T22:16:13,774 INFO  
> [regionserver/hbase-docker-2:16020-shortCompactions-0] 
> regionserver.CompactSplit: Completed compaction 
> region=t1,,1759788781868.60e54b8e10b9e2655bf1b2aca04e9a2f., 
> storeName=60e54b8e10b9e2655bf1b2aca04e9a2f/cf1, priority=12, 
> startTime=1759788973546; duration=0sec
> 2025-10-06T22:16:45,074 INFO  [LruBlockCacheStatsExecutor] 
> hfile.LruBlockCache: totalSize=786.40 MB, usedSize=590.80 KB, freeSize=785.82 
> MB, max=786.40 MB, blockCount=0, accesses=4, hits=0, hitRatio=0, 
> cachingAccesses=0, cachingHits=0, cachingHitsRatio=0,evictions=29, evicted=0, 
> evictedPerRun=0.0 {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to