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

mazhengxuan commented on HBASE-30054:
-------------------------------------

I have opened a pull request for this issue.

The problem is in the affected-session calculation used by backup deletion. A 
failed backup is not part of the committed backup chain, but deleting it 
currently runs the same cascading calculation used for completed backups. This 
can cause later successful incremental backups to be modified or deleted.

The patch limits the cascading calculation to backups in the COMPLETE state. 
Failed backups are still cleaned up normally, while later successful backups 
remain unchanged.

I also extended TestIncrementalBackupWithFailures with a regression case that 
creates a successful incremental backup after failed attempts, deletes a failed 
backup, and verifies that the successful backup remains complete with both 
tables.

> Deleting a FAILED backup cascades and deletes subsequent COMPLETE backups 
> --------------------------------------------------------------------------
>
>                 Key: HBASE-30054
>                 URL: https://issues.apache.org/jira/browse/HBASE-30054
>             Project: HBase
>          Issue Type: Bug
>          Components: backup&restore
>            Reporter: Hernan Romer
>            Assignee: mazhengxuan
>            Priority: Major
>              Labels: pull-request-available
>
> When a backup fails, failBackup restores the backup system table from a 
> snapshot taken before the backup started. This rolls back all state changes 
> (WAL timestamps, etc.), so the FAILED backup was never part of the backup 
> chain. No subsequent backup depends on it.     
>                                                                               
>                                                                             
> However, BackupAdminImpl.deleteBackup unconditionally runs cascade logic via 
> getAffectedBackupSessions, which finds all incremental backups newer than the 
> deleted backup (up to the next full). When the deleted backup is FAILED, this 
> cascade incorrectly identifies subsequent COMPLETE incrementals as "affected" 
> and deletes them via removeTableFromBackupImage.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to