[ https://issues.apache.org/jira/browse/HBASE-28720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dieter De Paepe updated HBASE-28720: ------------------------------------ Description: In `BackupCommands.RepairCommand#execute`, the following code block is present: {code:java} repairFailedBackupDeletionIfAny(conn, sysTable); repairFailedBackupMergeIfAny(conn, sysTable); {code} Both of these methods can be sketched as: {code:java} if (there are no unresolved merges/deletes) { BackupSystemTable.deleteSnapshot(conn); } else { BackupSystemTable.restoreFromSnapshot(conn); retry merge/delete }{code} In case of failed merges, there will be no unresolved deletes, hence the BackupSystemTable snapshot will be deleted. As a result, the restore for the merges will always fail. Currently unsure what the risks of this are, haven't explored the merge code yet. Update: it looks like the merge code doesn't create a BackupSystemTable snapshot. So the restore/delete snapshot for the merge method is pointless. was: In `BackupCommands.RepairCommand#execute`, the following code block is present: {code:java} repairFailedBackupDeletionIfAny(conn, sysTable); repairFailedBackupMergeIfAny(conn, sysTable); {code} Both of these methods can be sketched as: {code:java} if (there are no unresolved merges/deletes) { BackupSystemTable.deleteSnapshot(conn); } else { BackupSystemTable.restoreFromSnapshot(conn); retry merge/delete }{code} In case of failed merges, there will be no unresolved deletes, hence the BackupSystemTable snapshot will be deleted. As a result, the restore for the merges will always fail. Currently unsure what the risks of this are, haven't explored the merge code yet. > Merge repairs always fail to restore the BackupSystemTable snapshot > ------------------------------------------------------------------- > > Key: HBASE-28720 > URL: https://issues.apache.org/jira/browse/HBASE-28720 > Project: HBase > Issue Type: Bug > Components: backup&restore > Affects Versions: 2.6.0, 3.0.0, 4.0.0-alpha-1 > Reporter: Dieter De Paepe > Priority: Major > > In `BackupCommands.RepairCommand#execute`, the following code block is > present: > {code:java} > repairFailedBackupDeletionIfAny(conn, sysTable); > repairFailedBackupMergeIfAny(conn, sysTable); {code} > Both of these methods can be sketched as: > {code:java} > if (there are no unresolved merges/deletes) { > BackupSystemTable.deleteSnapshot(conn); > } else { > BackupSystemTable.restoreFromSnapshot(conn); > retry merge/delete > }{code} > In case of failed merges, there will be no unresolved deletes, hence the > BackupSystemTable snapshot will be deleted. As a result, the restore for the > merges will always fail. > Currently unsure what the risks of this are, haven't explored the merge code > yet. > Update: it looks like the merge code doesn't create a BackupSystemTable > snapshot. So the restore/delete snapshot for the merge method is pointless. -- This message was sent by Atlassian Jira (v8.20.10#820010)