Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Release History
===============

0.0.52 (2020-11-29)
+++++++++++++++++++
* Don't invalidate cache when opening files with mode rb, speed up small reads 2x.

0.0.51 (2020-10-15)
+++++++++++++++++++
* Add more logging for zero byte reads to investigate root cause.
Expand Down
3 changes: 2 additions & 1 deletion azure/datalake/store/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,8 @@ def __init__(self, azure, path, mode='rb', blocksize=2 ** 25,
# always invalidate the cache when checking for existence of a file
# that may be created or written to (for the first time).
try:
file_data = self.azure.info(path, invalidate_cache=True, expected_error_code=404)
invalidate = mode != 'rb'
file_data = self.azure.info(path, invalidate_cache=invalidate, expected_error_code=404)
exists = True
except FileNotFoundError:
exists = False
Expand Down