Zhiwen Deng created HBASE-30084:
-----------------------------------

             Summary: Use a temp directory to avoid creating dirty hfile files 
when enable splitToHFile
                 Key: HBASE-30084
                 URL: https://issues.apache.org/jira/browse/HBASE-30084
             Project: HBase
          Issue Type: Bug
          Components: regionserver
    Affects Versions: 2.7.0, 3.0.0-beta-2, 2.6.6
            Reporter: Zhiwen Deng


When we set "hbase.wal.split.to.hfile=true" to accelerate SCP, if the split 
WAL's RS crashes unexpectedly, dirty hfiles will be generated, causing Regions 
to fail to open.

The core reason is that we directly placed the hfiles in `recovered.hfiles` 
instead of first generating them as temp files and then moving them to 
`recovered.hfiles`. 

I have fixed this issue, and the function now works correctly. Below are some 
logs after the fix.
{code:java}
2026-04-15,11:50:50,695 INFO  [split-log-closeStream--pool7-t14] 
wal.BoundedRecoveredHFilesOutputSink - Renamed recovered hfile 
hdfs://test-dev/hbase/test-dev/data/default/ycsb-test/c6c21a44cc79b5252d4765434e665d9b/C/recovered.hfiles.tmp/hbase01.xxxx%2C12700%2C1776224501472.1776225008107/950c180f92374b8dbbc7614892125242
 to 
hdfs://test-dev/hbase/test-dev/data/default/ycsb-test/c6c21a44cc79b5252d4765434e665d9b/C/recovered.hfiles/950c180f92374b8dbbc7614892125242
2026-04-15,11:50:50,696 INFO  [split-log-closeStream--pool7-t14] 
wal.BoundedRecoveredHFilesOutputSink - deleted temp dir 
hdfs://test-dev/hbase/test-dev/data/default/ycsb-test/c6c21a44cc79b5252d4765434e665d9b/C/recovered.hfiles.tmp/ak-hbase01.xxxx%2C12700%2C1776224501472.1776225008107{code}
Which branch should I submit the pr to fix it?



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

Reply via email to