Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-13800

TestStore#testDeleteExpiredStoreFiles should create unique data/log directory for each call

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.1.0, 1.2.0, 2.0.0
    • 1.2.0, 1.1.1, 2.0.0
    • test
    • None
    • Windows

    • Reviewed

    Description

      When TestStore#init() was called twice in TestStore#testDeleteExpiredStoreFiles, it did not use different base directory for each call (other tests in the same test suite do). If the first call did not release the handle of WAL files fast enough, the second init() call would fail.

      This is constantly seen in Windows environment:

      java.io.IOException: Target WAL already exists within directory file:/C:/hbase/hbase-server/target/test-data/f39ecdde-1d04-4332-93c7-4c8df1e08e67/TestStoretestDeleteExpiredStoreFiles/WALs/testDeleteExpiredStoreFiles
      	at org.apache.hadoop.hbase.regionserver.wal.FSHLog.<init>(FSHLog.java:525)
      	at org.apache.hadoop.hbase.wal.DefaultWALProvider.init(DefaultWALProvider.java:97)
      	at org.apache.hadoop.hbase.wal.WALFactory.getProvider(WALFactory.java:147)
      	at org.apache.hadoop.hbase.wal.WALFactory.<init>(WALFactory.java:179)
      	at org.apache.hadoop.hbase.regionserver.TestStore.init(TestStore.java:185)
      	at org.apache.hadoop.hbase.regionserver.TestStore.init(TestStore.java:162)
      	at org.apache.hadoop.hbase.regionserver.TestStore.testDeleteExpiredStoreFiles(TestStore.java:307)
      	at org.apache.hadoop.hbase.regionserver.TestStore.testDeleteExpiredStoreFiles(TestStore.java:286)
      

      The fix is trivial: just like other tests in the same test suite, use different base directory for multiple init() calls in the same test.

      Attachments

        1. HBASE-13800.patch
          1 kB
          Stephen Yuan Jiang

        Activity

          People

            syuanjiang Stephen Yuan Jiang
            syuanjiang Stephen Yuan Jiang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: