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
5aeddb3051
commit
a0b2141a95
|
@ -34,6 +34,7 @@ import org.apache.hadoop.hbase.HRegionInfo;
|
|||
import org.apache.hadoop.hbase.HTableDescriptor;
|
||||
import org.apache.hadoop.hbase.classification.InterfaceAudience;
|
||||
// imports for things that haven't moved from regionserver.wal yet.
|
||||
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.regionserver.wal.WALEdit;
|
||||
|
@ -162,7 +163,13 @@ class DisabledWALProvider implements WALProvider {
|
|||
@Override
|
||||
public long append(HTableDescriptor htd, HRegionInfo info, WALKey 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()) {
|
||||
CellUtil.setSequenceId(cell, writeEntry.getWriteNumber());
|
||||
}
|
||||
}
|
||||
key.setWriteEntry(writeEntry);
|
||||
if (!this.listeners.isEmpty()) {
|
||||
final long start = System.nanoTime();
|
||||
long len = 0;
|
||||
|
|
Loading…
Reference in New Issue