Skip to content

Commit

Permalink
HBASE-22896 TestHRegion.testFlushMarkersWALFail is flaky (apache#551)
Browse files Browse the repository at this point in the history
* HBASE-22896 TestHRegion.testFlushMarkersWALFail is flaky

* delete blank line

(cherry picked from commit f57ea4e)

Change-Id: I7470acb1a75ca1996c453c70139edcfd3f257ae2
  • Loading branch information
sunhelly authored and Jenkins committed Sep 2, 2019
1 parent c7d5577 commit 18a946b
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1234,10 +1234,9 @@ public long getLength() {
this.region = initHRegion(tableName, HConstants.EMPTY_START_ROW,
HConstants.EMPTY_END_ROW, false, Durability.USE_DEFAULT, wal, family);
region.put(put);

// 3. Test case where ABORT_FLUSH will throw exception.
// Even if ABORT_FLUSH throws exception, we should not fail with IOE, but continue with
// DroppedSnapshotException. Below COMMMIT_FLUSH will cause flush to abort
// DroppedSnapshotException. Below COMMIT_FLUSH will cause flush to abort
wal.flushActions = new FlushAction [] {FlushAction.COMMIT_FLUSH, FlushAction.ABORT_FLUSH};

try {
Expand Down Expand Up @@ -2366,7 +2365,6 @@ public void testDataInMemoryWithoutWAL() throws IOException {
hLog.init();
// This chunk creation is done throughout the code base. Do we want to move it into core?
// It is missing from this test. W/o it we NPE.
ChunkCreator.initialize(MemStoreLABImpl.CHUNK_SIZE_DEFAULT, false, 0, 0, 0, null);
region = initHRegion(tableName, null, null, false, Durability.SYNC_WAL, hLog,
COLUMN_FAMILY_BYTES);

Expand Down Expand Up @@ -4852,7 +4850,6 @@ protected HRegion initHRegion(TableName tableName, byte[] startKey, byte[] stopK
String callingMethod, Configuration conf, boolean isReadOnly, byte[]... families)
throws IOException {
Path logDir = TEST_UTIL.getDataTestDirOnTestFS(callingMethod + ".log");
ChunkCreator.initialize(MemStoreLABImpl.CHUNK_SIZE_DEFAULT, false, 0, 0, 0, null);
HRegionInfo hri = new HRegionInfo(tableName, startKey, stopKey);
final WAL wal = HBaseTestingUtility.createWal(conf, logDir, hri);
return initHRegion(tableName, startKey, stopKey, isReadOnly,
Expand All @@ -4865,6 +4862,7 @@ protected HRegion initHRegion(TableName tableName, byte[] startKey, byte[] stopK
*/
public HRegion initHRegion(TableName tableName, byte[] startKey, byte[] stopKey,
boolean isReadOnly, Durability durability, WAL wal, byte[]... families) throws IOException {
ChunkCreator.initialize(MemStoreLABImpl.CHUNK_SIZE_DEFAULT, false, 0, 0, 0, null);
return TEST_UTIL.createLocalHRegion(tableName, startKey, stopKey,
isReadOnly, durability, wal, families);
}
Expand Down

0 comments on commit 18a946b

Please sign in to comment.