RFR: 6539707: (fc) MappedByteBuffer.force() method throws an IOException in a very simple test
Brian Burkhalter
bpb at openjdk.java.net
Wed Feb 24 16:51:40 UTC 2021
On Wed, 24 Feb 2021 16:00:06 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Hi Brian,
>>
>> just some curious questions.
>>
>> Does your test case always fail to force on Windows, or only intermittently? Since I have not seen these kind of errors in a long while.
>>
>> About the 3->5: were you able to reproduce it, and had better results with 5 than 3? I found an old issue in mongo and they seem to have done workaround way more aggressively (retry 1mio times or 60 seconds, whatever is faster):
>> https://github.com/mongodb/mongo/blob/c0ed1fde6a726909ae99b928a711e3c38837a4ae/src/mongo/util/mmap_win.cpp#L179
>>
>> Thanks, Thomas
>
> I put in the retry loop several years ago as a workaround to what we thought at the time was a Windows bug. It was very intermittent and seem to be load related. I suspect this issue really needs someone from the Windows team to comment.
The test was based on the one in the issue. I have not coerced it to fail. It is designed to fail on Windows only in case we can catch the flush failure. As far as I am concerned the retry iteration count increase could be removed from this issue altogether and the flush failure addressed in a different issue after there are comments from Microsoft. The present issue in fact ought to be renamed to something like "Mapped memory force methods should be specified to throw UncheckedIOExcreption".
-------------
PR: https://git.openjdk.java.net/jdk/pull/2636
More information about the nio-dev
mailing list