hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhang...@apache.org
Subject hbase git commit: HBASE-20146 Addendum Regions are stuck while opening when WAL is disabled
Date Thu, 15 Mar 2018 02:57:27 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.2 3d8f8aea7 -> 3340618b4


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>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/3340618b
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/3340618b
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/3340618b

Branch: refs/heads/branch-1.2
Commit: 3340618b497ad93277bdd0f71b69988a10363421
Parents: 3d8f8ae
Author: Ashish Singhi <ashishsinghi@apache.org>
Authored: Tue Mar 13 15:31:39 2018 +0530
Committer: zhangduo <zhangduo@apache.org>
Committed: Thu Mar 15 10:18:29 2018 +0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/wal/DisabledWALProvider.java    | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/3340618b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/DisabledWALProvider.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/DisabledWALProvider.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/DisabledWALProvider.java
index 7f4fb965..9e402b9 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/DisabledWALProvider.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/wal/DisabledWALProvider.java
@@ -33,6 +33,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;
@@ -154,7 +155,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;


Mime
View raw message