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

Windows Azure logs errors and retries if WRITETODATAFILES and FlushViewOfFile run at the same time

    • Fully Compatible
    • Windows

      Windows Azure Storage uses an MD5 hash to verify that it has correctly written data to disk. When mongod.exe modifies the buffer while it is being flushed to disk, this makes the MD5 comparison fail, and Azure Storage retries the operation. If it fails 4 times, Windows fails the call to FlushViewOfFile with error code 1 (ERROR_INVALID_FUNCTION), causing mongod.exe to issue Fatal Assertion 16387, with immediate exit.

      There is no requirement internally for WRITETODATAFILES to be allowed to run while FlushViewOfFile is running, and it could be argued that this is not the right thing to do. Preliminary testing shows that adding a mutex between these two threads prevents the Windows Azure Storage retries. This will probably improve worst-case performance (by avoiding the retries) and will prevent Fatal Assertions caused by excessive retries.

            Assignee:
            tad Tad Marshall
            Reporter:
            tad Tad Marshall
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: