You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Jean-Daniel Cryans (Commented) (JIRA)" <ji...@apache.org> on 2011/11/23 01:00:52 UTC
[jira] [Commented] (HBASE-4853) HBASE-4789 does overzealous pruning
of seqids
[ https://issues.apache.org/jira/browse/HBASE-4853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13155578#comment-13155578 ]
Jean-Daniel Cryans commented on HBASE-4853:
-------------------------------------------
An example of data loss.
First, we see a flush with seqid being 1389 but the message "Why is there a raw encodedRegionName in lastSeqWritten" means it deleted 1389.
{quote}
2011-11-22 11:21:08,526 WARN [RegionServer:1;hbasedev,54530,1321989619241.cacheFlusher] wal.HLog(1364): Why is there a raw encodedRegionName in lastSeqWritten? name=a9b1d96a4554f545a74142bc42f8c48e, seqid=1389
2011-11-22 11:21:08,526 INFO [RegionServer:1;hbasedev,54530,1321989619241.cacheFlusher] regionserver.HRegion(1259): Finished memstore flush of ~654.3k for region test,,1321989625594.a9b1d96a4554f545a74142bc42f8c48e. in 493ms, sequenceid=1388, compaction requested=false
{quote}
HLog roll happens, it sees 0 last seq id so it clears all the WALs.
{quote}
2011-11-22 11:21:08,932 INFO [RegionServer:1;hbasedev,54530,1321989619241.logRoller] wal.HLog(582): Roll /user/jdcryans/.logs/hbasedev,54530,1321989619241/hbasedev%2C54530%2C1321989619241.1321989667490, entries=41, filesize=25596. for /user/jdcryans/.logs/hbasedev,54530,1321989619241/hbasedev%2C54530%2C1321989619241.1321989668526
2011-11-22 11:21:08,932 DEBUG [RegionServer:1;hbasedev,54530,1321989619241.logRoller] wal.HLog(593): Last sequenceid written is empty. Deleting all old hlogs
{quote}
The last one had max seq id as 1424, which was never flushed.
{quote}
2011-11-22 11:21:08,967 INFO [RegionServer:1;hbasedev,54530,1321989619241.logRoller] wal.HLog(823): moving old hlog file /user/jdcryans/.logs/hbasedev,54530,1321989619241/hbasedev%2C54530%2C1321989619241.1321989667490 whose highest sequenceid is 1424 to /user/jdcryans/.oldlogs/hbasedev%2C54530%2C1321989619241.1321989667490
{quote}
> HBASE-4789 does overzealous pruning of seqids
> ---------------------------------------------
>
> Key: HBASE-4853
> URL: https://issues.apache.org/jira/browse/HBASE-4853
> Project: HBase
> Issue Type: Bug
> Reporter: stack
> Priority: Critical
>
> Working w/ J-D on failing replication test turned up hole in seqids made by the patch over in hbase-4789. With this patch in place we see lots of instances of the suspicious: 'Last sequenceid written is empty. Deleting all old hlogs'
> At a minimum, these lines need removing:
> {code}
> diff --git a/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java b/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
> index 623edbe..a0bbe01 100644
> --- a/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
> +++ b/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java
> @@ -1359,11 +1359,6 @@ public class HLog implements Syncable {
> // Cleaning up of lastSeqWritten is in the finally clause because we
> // don't want to confuse getOldestOutstandingSeqNum()
> this.lastSeqWritten.remove(getSnapshotName(encodedRegionName));
> - Long l = this.lastSeqWritten.remove(encodedRegionName);
> - if (l != null) {
> - LOG.warn("Why is there a raw encodedRegionName in lastSeqWritten? name=" +
> - Bytes.toString(encodedRegionName) + ", seqid=" + l);
> - }
> this.cacheFlushLock.unlock();
> }
> }
> {code}
> ... but above is no good w/o figuring why WALs are not being rotated off.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira