hgromer commented on code in PR #7346:
URL: https://github.com/apache/hbase/pull/7346#discussion_r2380336233


##########
hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestIncrementalBackupWithBulkLoad.java:
##########
@@ -147,6 +152,73 @@ private boolean containsRowWithKey(Table table, String 
rowKey) throws IOExceptio
     return result.containsColumn(famName, qualName);
   }
 
+  @Test
+  public void testUpdateFileListsRaceCondition() throws Exception {
+    // Test the race condition where files are archived during incremental 
backup
+    FileSystem fs = TEST_UTIL.getTestFileSystem();
+    Path testDir = TEST_UTIL.getDataTestDirOnTestFS(TEST_NAME + "_race_test");
+    fs.mkdirs(testDir);
+
+    Path file1 = new Path(testDir, "hfile1");

Review Comment:
   Take a look at how we build the paths to both the [active 
files](https://github.com/apache/hbase/blob/67420e33f972478102a847c5673f233da1f071db/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalTableBackupClient.java#L153)
 and the [archived bulkloads 
here](https://github.com/apache/hbase/blob/67420e33f972478102a847c5673f233da1f071db/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalTableBackupClient.java#L164).
 
   
   It might make sense for this test to replicate that logic to make sure that 
the `updateFileLists` method can correctly find the archive files.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to