hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeffr...@apache.org
Subject git commit: HBASE-11430: lastFlushSeqId has been updated wrongly during region open
Date Sat, 28 Jun 2014 00:51:02 GMT
Repository: hbase
Updated Branches:
  refs/heads/master e4138a3a9 -> c591a25f3


HBASE-11430: lastFlushSeqId has been updated wrongly during region open


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

Branch: refs/heads/master
Commit: c591a25f3c88cda5cde67f2b9dff44e0545f3008
Parents: e4138a3
Author: Jeffrey Zhong <jeffreyz@apache.org>
Authored: Fri Jun 27 17:58:32 2014 -0700
Committer: Jeffrey Zhong <jeffreyz@apache.org>
Committed: Fri Jun 27 17:58:32 2014 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/master/ServerManager.java  | 13 ++++++-------
 .../org/apache/hadoop/hbase/regionserver/HRegion.java  |  4 ++--
 2 files changed, 8 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/c591a25f/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
index b20231b..6204206 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
@@ -274,13 +274,12 @@ public class ServerManager {
       long l = entry.getValue().getCompleteSequenceId();
       if (existingValue != null) {
         if (l != -1 && l < existingValue) {
-          if (LOG.isDebugEnabled()) {
-            LOG.debug("RegionServer " + sn +
-                " indicates a last flushed sequence id (" + entry.getValue() +
-                ") that is less than the previous last flushed sequence id (" +
-                existingValue + ") for region " +
-                Bytes.toString(entry.getKey()) + " Ignoring.");
-          }
+          LOG.warn("RegionServer " + sn +
+              " indicates a last flushed sequence id (" + entry.getValue() +
+              ") that is less than the previous last flushed sequence id (" +
+              existingValue + ") for region " +
+              Bytes.toString(entry.getKey()) + " Ignoring.");
+
           continue; // Don't let smaller sequence ids override greater
           // sequence ids.
         }

http://git-wip-us.apache.org/repos/asf/hbase/blob/c591a25f/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
index a035c1a..c138938 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
@@ -763,7 +763,6 @@ public class HRegion implements HeapSize { // , Writable{
     this.closing.set(false);
     this.closed.set(false);
 
-    this.lastFlushSeqId = nextSeqid;
     if (coprocessorHost != null) {
       status.setStatus("Running coprocessor post-open hooks");
       coprocessorHost.postOpen();
@@ -1626,7 +1625,8 @@ public class HRegion implements HeapSize { // , Writable{
    */
   boolean shouldFlush() {
     // This is a rough measure.
-    if (this.lastFlushSeqId + this.flushPerChanges < this.sequenceId.get()) {
+    if (this.lastFlushSeqId > 0 
+          && (this.lastFlushSeqId + this.flushPerChanges < this.sequenceId.get()))
{
       return true;
     }
     if (flushCheckInterval <= 0) { //disabled


Mime
View raw message