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

Where possible 'cbbackupmgr' should avoid the truncate/overwrite pattern

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Minor
    • 7.1.0
    • 7.1.0
    • tools
    • None
    • 1

    Description

      What's the issue?
      When updating files, we quite often use utilities such as `os.WriteFile`, internally this will open the file with the 'O_TRUNC' flag, then write the given data. This opens ourselves to issues where truncation succeeds, but the write fails (meaning it's possible to end up with partial/empty files).

      What's the fix?
      For "mission critical" files, we should use atomic operations, for example when updating the plan.

      Attachments

        Issue Links

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

          Activity

            People

              james.lee James Lee
              james.lee James Lee
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty