You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by BlueDavy Lin <bl...@gmail.com> on 2011/10/10 04:07:07 UTC
Split bug will cause data loss or cann't read & write
hi!
Replay the problem is very easy,I added comment to
https://issues.apache.org/jira/browse/HBASE-3872.
We change code like below to fix the fatal bug:
if (!testing) {
this.journal.add(JournalEntry.PONR);
MetaEditor.offlineParentInMeta(server.getCatalogTracker(),this.parent.getRegionInfo(),
a.getRegionInfo(), b.getRegionInfo());
}
Another bug in current split code will cause the region cann't
read & write,If List<StoreFile> hstoreFilesToSplit =
this.parent.close(false); throw IOException,Split rollback,but it will
not open store file,so client cann't read & write the region,We use
below method to fix the problem:
List<StoreFile> hstoreFilesToSplit = null;
try{
hstoreFilesToSplit = this.parent.close(false);
}
catch(IOException e){
this.journal.add(JournalEntry.CLOSED_PARENT_REGION);
throw e;
}
--
=============================
| BlueDavy |
| http://www.bluedavy.com |
=============================
Re: Split bug will cause data loss or cann't read & write
Posted by Ted Yu <yu...@gmail.com>.
I followed up on HBASE-3872.
Please open a new JIRA.
Thanks
On Sun, Oct 9, 2011 at 7:07 PM, BlueDavy Lin <bl...@gmail.com> wrote:
> hi!
>
> Replay the problem is very easy,I added comment to
> https://issues.apache.org/jira/browse/HBASE-3872.
> We change code like below to fix the fatal bug:
> if (!testing) {
> this.journal.add(JournalEntry.PONR);
>
> MetaEditor.offlineParentInMeta(server.getCatalogTracker(),this.parent.getRegionInfo(),
> a.getRegionInfo(), b.getRegionInfo());
> }
>
>
> Another bug in current split code will cause the region cann't
> read & write,If List<StoreFile> hstoreFilesToSplit =
> this.parent.close(false); throw IOException,Split rollback,but it will
> not open store file,so client cann't read & write the region,We use
> below method to fix the problem:
> List<StoreFile> hstoreFilesToSplit = null;
> try{
> hstoreFilesToSplit = this.parent.close(false);
> }
> catch(IOException e){
> this.journal.add(JournalEntry.CLOSED_PARENT_REGION);
> throw e;
> }
>
> --
> =============================
> | BlueDavy |
> | http://www.bluedavy.com |
> =============================
>