Skip to content

Commit

Permalink
🐛 Fix bytes_processed exception when reading file with small buffer s…
Browse files Browse the repository at this point in the history
…ize #280
  • Loading branch information
lsabi1234 committed Aug 9, 2022
1 parent ad82769 commit 54d00eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rethinkdb/cli/_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ def fill_buffer(self):
if self._buffer_size == JSON_MAX_BUFFER_SIZE:
raise Exception(
f"Error: JSON max buffer size exceeded on file "
f"{self.name} (from position {self.bytes_processed}). "
f"{self.name} (from position {self._bytes_read}). "
f"Use '--max-document-size' to extend your buffer."
)
self._buffer_size = min(self._buffer_size * 2, JSON_MAX_BUFFER_SIZE)
Expand Down

0 comments on commit 54d00eb

Please sign in to comment.