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

Toshihiro Suzuki edited comment on HBASE-19934 at 2/5/18 6:09 AM:
------------------------------------------------------------------

I just attached a unit test patch to reproduce this issue.  The 
TestRestoreSnapshotFromClientWithRegionReplicas#testSnapshotAfterSplittingRegions()
 fails.


was (Author: brfrn169):
I just attached a unit test patch to reproduce this issue.  The 
TestRestoreSnapshotFromClientWithRegionReplicas#testSnapshotAfterSplittingRegions
 fails.

> HBaseSnapshotException when read replicas is enabled and online snapshot is 
> taken after region splitting
> --------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-19934
>                 URL: https://issues.apache.org/jira/browse/HBASE-19934
>             Project: HBase
>          Issue Type: Bug
>          Components: snapshots
>            Reporter: Toshihiro Suzuki
>            Priority: Major
>         Attachments: HBASE-19934-UT.patch
>
>
> Investigating HBASE-19893, I'm encountering another issue.
> Steps to reproduce are as follows:
> 1. Create a table
> {code:java}
> create "test", "cf", {REGION_REPLICATION => 2}{code}
> 2. Load data to the table
> {code:java}
> (0...2000).each{|i| put "test", "row#{i}", "cf:col", "val"}{code}
> 3. Split the table
> {code:java}
> split "test"{code}
> 4. Take a snapshot for the table
> {code:java}
> snapshot "test", "snap"{code}
> And I encountered the following error:
> {code:java}
> hbase(main):004:0> snapshot "test", "snap"
> ERROR: org.apache.hadoop.hbase.snapshot.HBaseSnapshotException: Snapshot { 
> ss=snap table=test type=FLUSH } had an error. Procedure snap { waiting=[] 
> done=[] }
> at 
> org.apache.hadoop.hbase.master.snapshot.SnapshotManager.isSnapshotDone(SnapshotManager.java:379)
> at 
> org.apache.hadoop.hbase.master.MasterRpcServices.isSnapshotDone(MasterRpcServices.java:1144)
> at 
> org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java)
> at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:406)
> at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:130)
> at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324)
> at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304)
> Caused by: org.apache.hadoop.hbase.snapshot.CorruptedSnapshotException via 
> Failed taking snapshot { ss=snap table=test type=FLUSH } due to 
> exception:Manifest region info {ENCODED => b910488a686644a7c1c85246d0d123d5, 
> NAME => 'test,,1517808523837_0001.b910488a686644a7c1c85246d0d123d5.', 
> STARTKEY => '', ENDKEY => '', OFFLINE => true, SPLIT => true, REPLICA_ID => 
> 1}doesn't match expected region:{ENCODED => ef8665859c0b19927b7dc127ec10120a, 
> NAME => 'test,,1517808523837.ef8665859c0b19927b7dc127ec10120a.', STARTKEY => 
> '', ENDKEY => '', OFFLINE => true, SPLIT => 
> true}:org.apache.hadoop.hbase.snapshot.CorruptedSnapshotException: Manifest 
> region info {ENCODED => b910488a686644a7c1c85246d0d123d5, NAME => 
> 'test,,1517808523837_0001.b910488a686644a7c1c85246d0d123d5.', STARTKEY => '', 
> ENDKEY => '', OFFLINE => true, SPLIT => true, REPLICA_ID => 1}doesn't match 
> expected region:{ENCODED => ef8665859c0b19927b7dc127ec10120a, NAME => 
> 'test,,1517808523837.ef8665859c0b19927b7dc127ec10120a.', STARTKEY => '', 
> ENDKEY => '', OFFLINE => true, SPLIT => true}
> at 
> org.apache.hadoop.hbase.errorhandling.ForeignExceptionDispatcher.rethrowException(ForeignExceptionDispatcher.java:82)
> at 
> org.apache.hadoop.hbase.master.snapshot.TakeSnapshotHandler.rethrowExceptionIfFailed(TakeSnapshotHandler.java:306)
> at 
> org.apache.hadoop.hbase.master.snapshot.SnapshotManager.isSnapshotDone(SnapshotManager.java:368)
> ... 6 more
> Caused by: org.apache.hadoop.hbase.snapshot.CorruptedSnapshotException: 
> Manifest region info {ENCODED => b910488a686644a7c1c85246d0d123d5, NAME => 
> 'test,,1517808523837_0001.b910488a686644a7c1c85246d0d123d5.', STARTKEY => '', 
> ENDKEY => '', OFFLINE => true, SPLIT => true, REPLICA_ID => 1}doesn't match 
> expected region:{ENCODED => ef8665859c0b19927b7dc127ec10120a, NAME => 
> 'test,,1517808523837.ef8665859c0b19927b7dc127ec10120a.', STARTKEY => '', 
> ENDKEY => '', OFFLINE => true, SPLIT => true}
> at 
> org.apache.hadoop.hbase.master.snapshot.MasterSnapshotVerifier.verifyRegionInfo(MasterSnapshotVerifier.java:223)
> at 
> org.apache.hadoop.hbase.master.snapshot.MasterSnapshotVerifier.verifyRegions(MasterSnapshotVerifier.java:201)
> at 
> org.apache.hadoop.hbase.master.snapshot.MasterSnapshotVerifier.verifySnapshot(MasterSnapshotVerifier.java:119)
> at 
> org.apache.hadoop.hbase.master.snapshot.TakeSnapshotHandler.process(TakeSnapshotHandler.java:202)
> at org.apache.hadoop.hbase.executor.EventHandler.run(EventHandler.java:104)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> Take a snapshot of specified table. Examples:
> hbase> snapshot 'sourceTable', 'snapshotName'
> hbase> snapshot 'namespace:sourceTable', 'snapshotName', {SKIP_FLUSH => true}
> Took 0.3390 seconds{code}



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

Reply via email to