-
Notifications
You must be signed in to change notification settings - Fork 0
Chunked + concurrent get_range for long ranges (#33) #37
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
e29e983
Docs: fix foreach_record example (no positional record type)
tbeason 90a784d
Raise default read timeout to 600s, map timeouts to BentoTimeoutError
tbeason 5ff32d1
Tolerant typed decode: skip interleaved non-schema records
tbeason a7e770a
Chunked + concurrent get_range (chunk/concurrency kwargs)
tbeason 82ea5f2
Docs: show the DBN alias import before using DBN types
tbeason fd1d242
Merge branch 'fix-foreach-record-docs' into raise-read-timeout
tbeason ce6748b
Do not map consumer-raised TimeoutError to BentoTimeoutError
tbeason 2c4f53f
Merge branch 'raise-read-timeout' into tolerant-typed-decode
tbeason 1583fe1
Merge branch 'tolerant-typed-decode' into chunked-get-range
tbeason 2f6c8b4
Validate chunk advancement at every boundary, not just the first
tbeason fd4d6fa
Merge main (squash of #36) into chunked-get-range
tbeason File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
A valid
CompoundPeriodcan pass the one-time positivity check on line 185 but later stop advancing as calendar arithmetic changes near a month boundary. For example, withstart_dt = DateTime(2024, 1, 1)andchunk = Month(1) - Day(30), the initial check advances to January 2, but eventuallyDateTime(2024, 1, 30) + chunkequals January 30. This loop then appends zero-length chunks indefinitely until memory exhaustion. Check thatnxt > tinside the loop and reject the period otherwise.Useful? React with 👍 / 👎.
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.
Fixed in 2f6c8b4 — the upfront positivity check is replaced by an in-loop guard that requires advancement at every boundary. Note the literal example can't reach this code as written:
Month(1) - Day(30)is aDates.CompoundPeriod, which is not a subtype ofDates.Period, so it's rejected at the kwarg signature. But the in-loop guard is the right defense anyway (it also catchesDay(0)/negative periods with a clear message, and survives a future widening of the kwarg type). Tests added.