Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-6807

Windows doesn't move existing files out of the way when creating a new file with the same name

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor - P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 5.0 Required
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Storage - Ra 2020-11-16

      Description

      Looking at some code, it's expected that WiredTiger renames any existing files out of the way when trying to create new files. This does happen to a certain extent, just not on Windows machines from my observation, and so I just wanted to find some clarification on the behaviour here or if this is indeed a bug.

      On my Linux machine running the test case below fails and I get:

      "unexpected file conflicting_rename found, renamed to conflicting_rename.1"
      

      But on Windows, there is no renaming and the test simply passes.

      See evergreen for more info.
       

      I've created a simple test case to demonstrate this (run in evergreen above):

      python3 test/suite/run.py test_conflicting_rename.py
      

      diff --git a/test/suite/test_conflicting_rename.py b/test/suite/test_conflicting_rename.py
      new file mode 100644
      index 000000000..b9e49035a
      --- /dev/null
      +++ b/test/suite/test_conflicting_rename.py
      @@ -0,0 +1,9 @@
      +import wiredtiger, wttest
      +
      +class test_conflicting_rename(wttest.WiredTigerTestCase):
      +    uri = 'file:conflicting_rename'
      +
      +    def test_conflicting_rename(self):
      +        self.session.create(self.uri, 'key_format=S,value_format=S')
      +        self.session.drop(self.uri, 'remove_files=false')
      +        self.session.create(self.uri, 'key_format=S,value_format=S')
      

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-storage-engines Backlog - Storage Engines Team
              Reporter:
              gregory.wlodarek Gregory Wlodarek
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated: