HBASE-11430: lastFlushSeqId has been updated wrongly during region open
This commit is contained in:
parent
e4138a3a94
commit
c591a25f3c
|
@ -274,13 +274,12 @@ public class ServerManager {
|
||||||
long l = entry.getValue().getCompleteSequenceId();
|
long l = entry.getValue().getCompleteSequenceId();
|
||||||
if (existingValue != null) {
|
if (existingValue != null) {
|
||||||
if (l != -1 && l < existingValue) {
|
if (l != -1 && l < existingValue) {
|
||||||
if (LOG.isDebugEnabled()) {
|
LOG.warn("RegionServer " + sn +
|
||||||
LOG.debug("RegionServer " + sn +
|
" indicates a last flushed sequence id (" + entry.getValue() +
|
||||||
" indicates a last flushed sequence id (" + entry.getValue() +
|
") that is less than the previous last flushed sequence id (" +
|
||||||
") that is less than the previous last flushed sequence id (" +
|
existingValue + ") for region " +
|
||||||
existingValue + ") for region " +
|
Bytes.toString(entry.getKey()) + " Ignoring.");
|
||||||
Bytes.toString(entry.getKey()) + " Ignoring.");
|
|
||||||
}
|
|
||||||
continue; // Don't let smaller sequence ids override greater
|
continue; // Don't let smaller sequence ids override greater
|
||||||
// sequence ids.
|
// sequence ids.
|
||||||
}
|
}
|
||||||
|
|
|
@ -763,7 +763,6 @@ public class HRegion implements HeapSize { // , Writable{
|
||||||
this.closing.set(false);
|
this.closing.set(false);
|
||||||
this.closed.set(false);
|
this.closed.set(false);
|
||||||
|
|
||||||
this.lastFlushSeqId = nextSeqid;
|
|
||||||
if (coprocessorHost != null) {
|
if (coprocessorHost != null) {
|
||||||
status.setStatus("Running coprocessor post-open hooks");
|
status.setStatus("Running coprocessor post-open hooks");
|
||||||
coprocessorHost.postOpen();
|
coprocessorHost.postOpen();
|
||||||
|
@ -1626,7 +1625,8 @@ public class HRegion implements HeapSize { // , Writable{
|
||||||
*/
|
*/
|
||||||
boolean shouldFlush() {
|
boolean shouldFlush() {
|
||||||
// This is a rough measure.
|
// 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;
|
return true;
|
||||||
}
|
}
|
||||||
if (flushCheckInterval <= 0) { //disabled
|
if (flushCheckInterval <= 0) { //disabled
|
||||||
|
|
Loading…
Reference in New Issue