hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-12485) Maintain SeqId monotonically increasing
Date Sun, 07 Dec 2014 18:06:12 GMT

    [ https://issues.apache.org/jira/browse/HBASE-12485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14237219#comment-14237219
] 

stack commented on HBASE-12485:
-------------------------------

[~jeffreyz] Thanks for making the change (and for doing old and new style handling). +1

We only parse with the new style file name ending in below....

698	            Long tmpSeqId = Long.parseLong(fileName.substring(0, fileName.length()
688	                    - SEQUENCE_ID_FILE_SUFFIX.length()));	699	                - SEQUENCE_ID_FILE_SUFFIX_LENGTH));

That is because if old style, its stale... not pertinent to this recovery?

Previous, we just added 1 always when we did this:

   long nextSeqid = maxSeqId;

But you don't do it when you add the safety margin any more because "why add 1 when we just
added 100000?" -- that is the reasoning?



Next time

688	          if (isSequenceIdFile(p)) {
689	            return true;
690	          }
691	          return false;

should be just 'return isSequenceIdFile(p);'


Nice patch and fix [~jeffreyz] -- +1

> Maintain SeqId monotonically increasing
> ---------------------------------------
>
>                 Key: HBASE-12485
>                 URL: https://issues.apache.org/jira/browse/HBASE-12485
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Jeffrey Zhong
>            Assignee: Jeffrey Zhong
>             Fix For: 1.0.0, 2.0.0
>
>         Attachments: HBASE-12485-v2.patch, HBASE-12485-v2.patch, HBASE-12485.patch
>
>
> We added FLUSH, REGION CLOSE events into WAL, for each those events the region SeqId
is bumped. 
> The issue comes from region close operation. Because when opening a region, we use flushed
SeqId from store files while after store flush during region close we still write COMMIT_FLUSH,
REGION_CLOSE events etc which respectively bump up SeqId. Therefore, the region opening SeqId
is lower than it should be.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message