Affects Version/s: 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 2.0.0
Release Note:Previously custom hbase.wal.dir, which is not on the same filesystem as hbase rootdir, results in data loss because we write recovered edits into a different place than where the recovering region server looks for them. This is fixed by retrieving actual recovered edits from the correct location.
When custom hbase.wal.dir is configured the recovery system uses it in place of the HBase root dir and thus constructs an incorrect path for recovered edits when splitting WALs. This causes the recovery code in Region Servers to believe there are no recovered edits to replay, which causes a loss of writes that had not flushed prior to loss of a server.
This is an Azure HDInsight HBase cluster with HDP 2.6. and HBase 22.214.171.124.6.3.2-14
By default the underlying data is going to wasb://xxxxx@yyyyy/hbase
I tried to move WAL folders to HDFS, which is the SSD mounted on each VM at /mnt.
Procedure to reproduce this issue:
1. create a table in hbase shell
2. insert a row in hbase shell
3. reboot the VM which hosts that region
4. scan the table in hbase shell and it is empty
Looking at the region server logs:
The log split/replay ignored actual WAL due to WALSplitter is looking for the region directory in the hbase.wal.dir we specified rather than the hbase.rootdir.
Looking at the source code,
https://github.com/apache/hbase/blob/master/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALSplitter.java it uses the rootDir, which is walDir, as the tableDir root path.
So if we use
HBASE-17437, waldir and hbase rootdir are in different path or even in different filesystem, then the #5 uses walDir as tableDir is apparently wrong.