public class TestWALMonotonicallyIncreasingSeqId extends Object
MVCCPreAssign is added by HBASE-16698, but pre-assign mvcc is only used in put/delete path. Other write paths like increment/append still assign mvcc in ringbuffer's consumer thread. If put and increment are used parallel. Then seqid in WAL may not increase monotonically Disorder in wals will lead to data loss.
This case use two thread to put and increment at the same time in a single region. Then check the seqid in WAL. If seqid is wal is not monotonically increasing, this case will fail
| Modifier and Type | Class and Description |
|---|---|
class |
TestWALMonotonicallyIncreasingSeqId.IncThread |
class |
TestWALMonotonicallyIncreasingSeqId.PutThread |
| Modifier and Type | Field and Description |
|---|---|
static HBaseClassTestRule |
CLASS_RULE |
org.junit.rules.TestName |
name |
String |
walProvider |
| Constructor and Description |
|---|
TestWALMonotonicallyIncreasingSeqId() |
| Modifier and Type | Method and Description |
|---|---|
static List<Object[]> |
data() |
void |
setUp() |
void |
tearDown() |
static void |
tearDownAfterClass() |
void |
testWALMonotonicallyIncreasingSeqId() |
public static final HBaseClassTestRule CLASS_RULE
public String walProvider
public org.junit.rules.TestName name
public TestWALMonotonicallyIncreasingSeqId()
public void setUp() throws IOException
IOExceptionpublic void tearDown() throws IOException
IOExceptionpublic static void tearDownAfterClass() throws IOException
IOExceptionpublic void testWALMonotonicallyIncreasingSeqId() throws Exception
ExceptionCopyright © 2007–2019 Cloudera. All rights reserved.