-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-1096: [C++] CreateFileMapping maximum size calculation issue #756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cpp/src/arrow/io/mman.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MSVC defines off_t as
typedef long _off_t; // file offset value
msvc long type width is 32 bits and it's not enough to keep 64 bits of size_t(unsigned long long).
File size over 4Gb needs more than 32 bits, that caused the issue.
cpp/src/arrow/io/io-file-test.cc
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need to write data to the file for the test to pass?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wesm , it might be good to test that the whole range of allocated bytes in memory mapped file is writable/readable (since mmap implementation contains logic to calculate file offset and size independently). If that's fine I will change the unit test name from ReadOver4GbFile to ReadWriteOver4GbFile.
cpp/src/arrow/io/io-file-test.cc
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to go in a TearDown method so it happens on failure also
cpp/src/arrow/io/io-file-test.cc
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That adds file to be deleted on TearDown
|
@wesm , have updated changes, thanks! |
|
This test takes about 5 seconds to run on my machine with a very fast flash drive, so I don't think we should run it by default. Can you add |
|
@wesm , okay, sure, have updated the test to be disabled by default, thanks |
|
Appveyor build here https://ci.appveyor.com/project/MaxRisuhin/arrow/build/1.0.80. +1, thanks @Maxris! |
No description provided.