Ujjawal Kumar created HBASE-29662:
-------------------------------------

             Summary: Reading data via TableSnapshotInputFormat should fail 
instead of reading no data if restore directory got deleted 
                 Key: HBASE-29662
                 URL: https://issues.apache.org/jira/browse/HBASE-29662
             Project: HBase
          Issue Type: Bug
          Components: snapshots
            Reporter: Ujjawal Kumar


We observed an issue in our production where data read via 
TableSnapshotInputFormat was empty even though the snapshot had actual data. 
The sequence of events look like this : 
1. Snapshot was restored into a temp directory via 
RestoreSnapshotHelper.copySnapshotForScanner (via 
TableMapReduceUtil.initTableSnapshotMapperJob)   as part of job submission
2. The temp directory was deleted by another process
3. Within mapper, HRegion were created on top of temp directory. 
HRegionFileSystem#checkRegionInfoOnFilesystem was called to check regioninfo, 
*it didn't find region level directory and recreated an empty one !* 

Due to this, the MR job didn't read any data but was considered successful. 

*The correct behavior would be to ensure that mapper fails if temp directory 
doesn't exist*  



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

Reply via email to