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

cbbackupmgr merge fails on Windows with a "file is being used by another process" error

    XMLWordPrintable

Details

    Description

      What's the issue?
      The merge sub-command is broken on Windows. Merges will fail with an error indicating that a file is in use by another process.

      Steps to reproduce
      1) Install 6.6.x Couchbase Server
      2) Setup a single node cluster with only the data service
      3) Load a sample bucket
      4) Perform three backups (the last two will be empty)
      5) Perform a merge

      What's the fix?
      Provisionally, this looks to be an issue with the atomic update of the cbbackupmgr stats files on Windows; we're failing to rename the file because it's currently open (it's closed using a defer statement). In CC some refactoring work took place which updated the way we read/wrote resources so that more functionality is shared. We should use there function where possible instead of manually encoding JSON and writing to a file. This should fix the issue explained above because the file will be opened/closed in an entirely different scope i.e. by the time we rename the file, it will definitely be closed.

      Attachments

        For Gerrit Dashboard: MB-43134
        # Subject Branch Project Status CR V

        Activity

          People

            asad.zaidi Asad Zaidi (Inactive)
            shivani.gupta Shivani Gupta
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty