You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Rushabh Shah (Jira)" <ji...@apache.org> on 2021/09/01 13:06:00 UTC
[jira] [Created] (HBASE-26247)
TestWALRecordReader#testWALRecordReaderActiveArchiveTolerance doesn't read
archived WAL file.
Rushabh Shah created HBASE-26247:
------------------------------------
Summary: TestWALRecordReader#testWALRecordReaderActiveArchiveTolerance doesn't read archived WAL file.
Key: HBASE-26247
URL: https://issues.apache.org/jira/browse/HBASE-26247
Project: HBase
Issue Type: Bug
Reporter: Rushabh Shah
TestWALRecordReader#testWALRecordReaderActiveArchiveTolerance is testing the following scenario.
1. Create a new WAL file
2. Write 2 KVs to WAL file.
3. Close the WAL file.
4. Instantiate WALInputFormat#WALKeyRecordReader with the WAL created in step 1.
5. Read the first KV.
6. Archive the WAL file in oldWALs directory via rename operation.
7. Read the second KV. This will test that WALKeyRecordReader will encounter FNFE since the WAL file is not longer present in the original location and it will handle the FNFE by opening the WAL file from archived location.
In step#7, the test is expecting that it will encounter FNFE and it will open a new reader but in reality, it is not encountering FNFE. I think the reason is, during rename operation, HDFS just changes the internal metadata for the file name. The InodeID, hdfs blocks and block locations remains the same. While reading the first KV, DFSInputStream caches all the HDFS blocks and location data so it doesn't have to go to namenode to re-resolve the file name.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)