feat: change default file format version to 2.1#6115
feat: change default file format version to 2.1#6115westonpace wants to merge 5 commits intolance-format:mainfrom
Conversation
PR Review: feat: change default file format version to 2.1The change is small and well-scoped. A few observations: Enum ordering and
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
westonpace
left a comment
There was a problem hiding this comment.
Mostly minor test fixes but there was one legitimate bug that needed fixed.
| assert len(page.buffers) > 0 | ||
| for buffer in page.buffers: | ||
| assert buffer.position % 64 == 0 | ||
| assert buffer.size > 0 |
There was a problem hiding this comment.
Miniblock means we now have two buffers, even for primitive data.
| # until we've accumulated 8MiB for a page. | ||
| assert metrics.fragments_removed == 2 | ||
| assert metrics.fragments_added == 4 | ||
| assert metrics.fragments_added > 2 |
There was a problem hiding this comment.
Spent some time tracking this down. It is 8 now instead of 4. It seems when we read in 2.1 the arrays get allocated a buffer with 2MB of capacity even though there is only 1MB of data. Might be worth some further investigation at some point but not critical.
| /// this fires when the wrapper is dropped — even if the stream was not fully | ||
| /// consumed. | ||
| #[pin_project(PinnedDrop)] | ||
| pub struct OnDropStream<S: Stream, F: FnOnce()> { |
There was a problem hiding this comment.
Extra utility to add on_drop method
| stream.chain(check_scheduler).boxed() | ||
| stream | ||
| .chain(check_scheduler) | ||
| .on_drop(move || { |
There was a problem hiding this comment.
This was a bit tricky. There was no initialization needed in 2.0 and so we never noticed this. Bascially...the I/O queue fills up and blocks, the decode thread can't get around to decoding and draining the backpressure queue because the stream has been dropped. So the scheduler hangs. This is expected. When we drop everything we should cancel all the I/O and cleanup.
However, we don't drop everything because we have a reference to the I/O scheduler here. So the fix here aborts the scheduler thread if the stream is dropped.
9532ca2 to
332c367
Compare
No description provided.