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)

Reply via email to