HBASE-16270 Handle duplicate clearing of snapshot in region replicas (Robert Yokota)

This commit is contained in:
Enis Soztutar 2016-08-24 06:33:46 -07:00
parent 31f16d6aec
commit dda8f67b2c
1 changed files with 1 additions and 0 deletions

View File

@ -190,6 +190,7 @@ public abstract class AbstractMemStore implements MemStore {
*/
@Override
public void clearSnapshot(long id) throws UnexpectedStateException {
if (this.snapshotId == -1) return; // already cleared
if (this.snapshotId != id) {
throw new UnexpectedStateException("Current snapshot id is " + this.snapshotId + ",passed "
+ id);