Details
-
Bug
-
Resolution: Fixed
-
Major
-
6.6.0, 6.6.1, 7.0.0-Beta1
-
Triaged
-
1
-
Yes
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 |
146197,2 | MB-43134 Improve logging around CBM failures | master | cbbs | Status: MERGED | +2 | +1 |
146205,1 | MB-43134 Fix atomic update of stats file on Windows | master | backup | Status: ABANDONED | 0 | +1 |
146218,4 | MB-43134 Fix atomic update of stats file on Windows | mad-hatter | backup | Status: MERGED | +2 | +1 |
146670,1 | Merge branch 'mad-hatter' into master | master | backup | Status: MERGED | +2 | +1 |