Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-91761

Be robust to failures deleting FTDC metrics.interim files on Windows

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Service Arch
    • Programmability 2024-06-24, Programmability 2024-07-08, Programmability 2024-07-22, Programmability 2024-08-05, Programmability 2024-08-19
    • 200

      On Windows, processes normally open files in a way that forbids other processes from deleting them. This is in contrast to posix-based systems where unlink is allowed to remove the name of a file that processes have open. There may also be other reasons we could fail to delete a file on Windows.

      Recently we've been observing failures to remove the FTDC metrics.interim file on Windows using boost::filesystem::remove here. The error code is ERROR_INVALID_HANDLE, which I don't think corresponds to another process holding the file open (I think we'd expect ERROR_ACCESS_DENIED, ERROR_SHARING_VIOLATION, or ERROR_LOCK_VIOLATION). Nonetheless, these kinds of failures are a fact of life on Windows and we should probably be robust to them.

      We've observed similar problems in the past with the shell. See SERVER-60887 and SERVER-44553 and the associated BFs for more information.

      It's worth noting that this failure starting happening right after our windows-vsCurrent-* hosts got an update. I don't think the update is to blame per se, it probably just exposed the issue somehow.

            Assignee:
            ryan.berryhill@mongodb.com Ryan Berryhill
            Reporter:
            ryan.berryhill@mongodb.com Ryan Berryhill
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: