-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HBASE-25932: Ensure replication reads the trailer bytes from WAL.
This bug was exposed by the test from HBASE-25924. Since this wal implementations close the wal asynchronously, replication can potentially miss the trailer bytes. (see jira comment for detailed analysis). While this is not a correctness problem (since trailer does not have any entry data), it erroneously bumps a metric that is used to track skipped bytes in WAL resulting in false alarms which is something we should avoid.
- Loading branch information
Showing
6 changed files
with
102 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
.../test/java/org/apache/hadoop/hbase/replication/regionserver/TestFSHLogWALEntryStream.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.apache.hadoop.hbase.replication.regionserver; | ||
|
||
import org.apache.hadoop.hbase.HBaseTestingUtility; | ||
import org.apache.hadoop.hbase.testclassification.LargeTests; | ||
import org.apache.hadoop.hbase.testclassification.ReplicationTests; | ||
import org.apache.hadoop.hbase.wal.AbstractFSWALProvider; | ||
import org.apache.hadoop.hbase.wal.FSHLogProvider; | ||
import org.apache.hadoop.hbase.wal.WALFactory; | ||
import org.junit.BeforeClass; | ||
import org.junit.experimental.categories.Category; | ||
|
||
/** | ||
* TestWALEntryStream with {@link org.apache.hadoop.hbase.wal.FSHLogProvider} as the WAL provider. | ||
*/ | ||
@Category({ ReplicationTests.class, LargeTests.class }) | ||
public class TestFSHLogWALEntryStream extends TestWALEntryStream { | ||
|
||
@BeforeClass | ||
public static void setUpBeforeClass() throws Exception { | ||
TEST_UTIL = new HBaseTestingUtility(); | ||
CONF = TEST_UTIL.getConfiguration(); | ||
CONF.setClass(WALFactory.WAL_PROVIDER, FSHLogProvider.class, AbstractFSWALProvider.class); | ||
CONF.setLong("replication.source.sleepforretries", 10); | ||
TEST_UTIL.startMiniDFSCluster(3); | ||
cluster = TEST_UTIL.getDFSCluster(); | ||
fs = cluster.getFileSystem(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters