Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-60156

[CBM] Make remove subcommand safer to use

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • Morpheus
    • None
    • tools
    • None
    • 0

    Description

      What is the problem?
      The remove subcommand is quite naive currently. As soon as it is executed it goes and deletes the files either on disk or in the cloud (using ListObjects and RemoveObjects). If something fails during the remove, or it is interrupted, then you can be left in a state where some of the data is removed but not all, and only some information in the logs that this happened.

      What is the solution?
      One thing we could do is output a list of the folders we are going to delete and ask the user to confirm whether or not they accept. We would need a flag to not prompt however, as some users may use the command is scripts for automatic retention.

      We should also find a way to detect when a remove was interrupted. To do this we should record in a file what we are going to delete and ensure that we don't delete that file until the end. One option would be to store the .info files that are in the repo and backup folders.

      When another command starts that we should check these files and print an error message (or maybe warning). This might be faffier if we use separate files rather than a single file at the root.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            owend Daniel Owen
            Matt.Hall Matt Hall
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty