-
Notifications
You must be signed in to change notification settings - Fork 19
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
xrdfile: fixed reading part of file bigger than 2GB when file cursor set over 2GB. #86
Conversation
|
||
|
||
def test_reading_begining_of_big_file(tmppath): | ||
"""Tests reading end of big file.""" |
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.
minor: code repetitions in the tests, could be reusable
xrootdpyfs/xrdfile.py
Outdated
@@ -22,6 +23,8 @@ | |||
from .utils import is_valid_path, is_valid_url, spliturl, \ | |||
translate_file_mode_to_flags | |||
|
|||
LOGGER = logging.getLogger(__name__) |
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.
I would keep logger
as lowercase, for consistency with the rest of the code
xrootdpyfs/xrdfile.py
Outdated
chunksize = sizehint if sizehint > 0 else self.size - self._ipp | ||
|
||
if chunksize >= 2147483648: # 2GB in bytes | ||
LOGGER.warning( |
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.
Is the logging necessary here? I mean the library is going to throw an OverFlowError if you pass beyond the limit. Also, as far as I remember, I did some tests, and it's not exactly 2GB the limit for some reason.
Either we just say that chunksizes >X get set to X so that the read will succeed....alternativelty, we throw an error
…set over 2GB. Docker update for tests not to fail as last working xrootd is 4.7.1. closes: inveniosoftware#85
Additionally dockerfile update for tests not to fail as last working xrootd is 4.7.1.
closes: #85