You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Duo Zhang (JIRA)" <ji...@apache.org> on 2018/02/21 10:29:00 UTC

[jira] [Commented] (HBASE-20037) Race when calling SequenceIdAccounting.resetHighest

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

Duo Zhang commented on HBASE-20037:
-----------------------------------

The problem here is that, we call SequenceIdAccounting.resetHighest after we start processing new request. For testRecoveredEdits, things could happen like this:

1. start processing new requests
2. all edits have been written out
3. SequenceIdAccounting.resetHighest is called and the highestSequenceIds is empty now.
4. a new log roll is coming
5. When calling SequenceIdAccounting.resetHighest, the highestSequenceIds is empty then when calling SequenceIdAccounting.areAllLower we think the wal file which has just been rolled can be safely removed since the sequenceids passed in is empty(then we think the file is empty!), and it will be moved to oldWALs, although we have written something into it in step 2.

This may also have other bad effects since we record the wrong sequence ids for a wal file, and it may cause data loss, so set this issue as a blocker.

[~stack] FYI. Hope this time we could fix the TestDLSXXX...

Thanks.

> Race when calling SequenceIdAccounting.resetHighest
> ---------------------------------------------------
>
>                 Key: HBASE-20037
>                 URL: https://issues.apache.org/jira/browse/HBASE-20037
>             Project: HBase
>          Issue Type: Bug
>          Components: wal
>            Reporter: Duo Zhang
>            Assignee: Duo Zhang
>            Priority: Blocker
>             Fix For: 2.0.0-beta-2
>
>         Attachments: HBASE-20037.patch
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)