[SERVER-5819] Use FileAllocator on Windows Created: 10/May/12  Updated: 11/Jul/16  Resolved: 12/Jun/12

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 2.0.5, 2.1.1
Fix Version/s: 2.1.2

Type: Bug Priority: Minor - P4
Reporter: Ben Becker Assignee: Ben Becker
Resolution: Done Votes: 0
Labels: FileAllocator, mmap
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-6043 exception caught in FileAllocator on ... Closed
Related
related to SERVER-1459 FlushViewOfFile failed 33 (and othe n... Closed
related to SERVER-7039 Investigate improving pre-allocation ... Closed
is related to SERVER-1163 Writing 44K records a second and mong... Closed
Operating System: Windows
Participants:

 Description   

Testing revealed occasional unexpected long delays (and retries) when calling FlushViewOfFile(). As a work around, we could simply allocate (and zero out) the files using the existing FileAllocator implementation. Initial testing seems to indicate that this avoids any failures in FlushViewOfFile(), which would normally require retrying.



 Comments   
Comment by Tad Marshall [ 08/Feb/13 ]

A hotfix is available from Microsoft for Windows 7 and Windows Server 2008 R2 that eliminates the root cause of the issue with FlushViewOfFile.

http://support.microsoft.com/kb/2731284

Comment by auto [ 11/Jun/12 ]

Author:

{u'login': u'', u'name': u'Ben Becker', u'email': u'ben.becker@10gen.com'}

Message: SERVER-5819: fix file allocator on win32
Branch: master
https://github.com/mongodb/mongo/commit/9a5324a03581753b7c1e7a66959d3c60e7ed7a85

Comment by Ben Becker [ 08/Jun/12 ]

Fixed PRNG initialization and errno output

Comment by auto [ 08/Jun/12 ]

Author:

{u'login': u'', u'name': u'Ben Becker', u'email': u'ben.becker@10gen.com'}

Message: SERVER-5819: initialize PRNG
Branch: master
https://github.com/mongodb/mongo/commit/42cbf8e5bbfa0762c662a380cdb9bfb700808d5e

Comment by Ben Becker [ 08/Jun/12 ]

Fixed – needed to seed the PRNG.

Comment by Eric Milkie [ 08/Jun/12 ]

http://buildbot.mongodb.org/builders/Windows%2064-bit/builds/4764/steps/test_7/logs/stdio

Fri Jun 08 03:08:14 [FileAllocator] error: couldn't rename /data/db/sconsTests/_tmp/18467 to /data/db/sconsTests/test.2 errno:0 The operation completed successfully.
Fri Jun 08 03:08:14 [FileAllocator] error failed to allocate new file: /data/db/sconsTests/test.2 size: 268435456 errno:0 The operation completed successfully.
Fri Jun 08 03:08:14 [FileAllocator]     will try again in 10 seconds
Fri Jun 08 03:08:14 [FileAllocator] Assertion: 13294:caught exception: boost::filesystem::remove: The process cannot access the file because it is being used by another process: "\data\db\sconsTests\test.2" src\mongo\util\file_allocator.cpp 319

Comment by auto [ 08/Jun/12 ]

Author:

{u'login': u'', u'name': u'Ben Becker', u'email': u'ben.becker@10gen.com'}

Message: SERVER-5819: implement FileAllocator on Windows to prevent FlushViewOfFiles failures
Branch: master
https://github.com/mongodb/mongo/commit/58189e7c1e46700a081b5b1c14f679fbc2edffdd

Generated at Thu Feb 08 03:09:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.