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

Vladimir Rodionov commented on HBASE-16392:
-------------------------------------------

Message is in Delete command (BackupCommands class):
{code}
    @Override
    public void execute() throws IOException {
      if (cmdline == null || cmdline.getArgs() == null || 
cmdline.getArgs().length < 2) {
        printUsage();
        throw new IOException(INCORRECT_USAGE);
      }

      super.execute();

      String[] args = cmdline.getArgs();
      String[] backupIds = new String[args.length - 1];
      System.arraycopy(args, 1, backupIds, 0, backupIds.length);
      try (BackupAdminImpl admin = new BackupAdminImpl(conn);) {
        int deleted = admin.deleteBackups(backupIds);
        System.out.println("Deleted " + deleted + " backups. Total requested: " 
+ args.length);
      } catch (IOException e) {
        System.err.println("Delete command FAILED. Please run backup repair 
tool to restore backup system integrity");
        throw e;
      }

    }
{code}

> Backup delete fault tolerance
> -----------------------------
>
>                 Key: HBASE-16392
>                 URL: https://issues.apache.org/jira/browse/HBASE-16392
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Vladimir Rodionov
>            Assignee: Vladimir Rodionov
>              Labels: backup
>             Fix For: 2.0.0
>
>         Attachments: HBASE-16392-v1.patch, HBASE-16392-v2.patch
>
>
> Backup delete modified file system and backup system table. We have to make 
> sure that operation is atomic, durable and isolated.
> Delete operation:
> # Start backup session (this guarantees) that system will be blocked for all 
> backup commands during delete operation
> # Save list of tables being deleted to system table
> # Before delete operation we take backup system table snapshot  
> # During delete operation we detect any failures and restore backup system 
> table from snapshot, then finish backup session
> # To guarantee consistency of the data, delete operation MUST be repeated
> # We guarantee that all file delete operations are idempotent, can be 
> repeated multiple times
> # Any backup operations will be blocked until consistency is restored
> # To restore consistency, repair command must be executed.
> # Repair command checks if there is failed delete op in a backup system 
> table, and repeats delete operation



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to