HBASE-20146 Addendum Regions are stuck while opening when WAL is disabled
Signed-off-by: zhangduo <zhangduo@apache.org> Signed-off-by: Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
parent
63ce0c0733
commit
24ea9d1e48
|
@ -32,6 +32,7 @@ import org.apache.hadoop.hbase.Cell;
|
|||
import org.apache.hadoop.hbase.HConstants;
|
||||
import org.apache.hadoop.hbase.PrivateCellUtil;
|
||||
import org.apache.hadoop.hbase.client.RegionInfo;
|
||||
import org.apache.hadoop.hbase.regionserver.MultiVersionConcurrencyControl.WriteEntry;
|
||||
import org.apache.hadoop.hbase.regionserver.wal.WALActionsListener;
|
||||
import org.apache.hadoop.hbase.regionserver.wal.WALCoprocessorHost;
|
||||
import org.apache.hadoop.hbase.util.FSUtils;
|
||||
|
@ -162,7 +163,13 @@ class DisabledWALProvider implements WALProvider {
|
|||
@Override
|
||||
public long append(RegionInfo info, WALKeyImpl key, WALEdit edits, boolean inMemstore)
|
||||
throws IOException {
|
||||
key.setWriteEntry(key.getMvcc().begin());
|
||||
WriteEntry writeEntry = key.getMvcc().begin();
|
||||
if (!edits.isReplay()) {
|
||||
for (Cell cell : edits.getCells()) {
|
||||
PrivateCellUtil.setSequenceId(cell, writeEntry.getWriteNumber());
|
||||
}
|
||||
}
|
||||
key.setWriteEntry(writeEntry);
|
||||
if (!this.listeners.isEmpty()) {
|
||||
final long start = System.nanoTime();
|
||||
long len = 0;
|
||||
|
|
Loading…
Reference in New Issue