Skip to content

feat: check VortexReadAt::read_at results in the I/O driver#7783

Merged
danking merged 8 commits intodevelopfrom
dk/verify-bytes-from-read-at-implementation
May 6, 2026
Merged

feat: check VortexReadAt::read_at results in the I/O driver#7783
danking merged 8 commits intodevelopfrom
dk/verify-bytes-from-read-at-implementation

Conversation

@danking
Copy link
Copy Markdown
Contributor

@danking danking commented May 4, 2026

This ensures misbehaving VortexReadAt implementations cannot trigger later bad behavior by the I/O driver. Instead, the driver raises an error as close as possible to the badly behaving VortexReadAt implementation.

This ensures misbehaving VortexReadAt implementations cannot trigger later bad behavior by the I/O
driver. Instead, the driver raises an error as close as possible to the badly behaving VortexReadAt
implementation.

Signed-off-by: Daniel King <dan@spiraldb.com>
@danking danking requested review from a10y and joseph-isaacs May 4, 2026 17:38
@danking danking marked this pull request as ready for review May 4, 2026 17:38
Comment thread vortex-file/src/read/request.rs Outdated
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 4, 2026

Merging this PR will improve performance by 17.98%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
✅ 1205 untouched benchmarks

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime cuda/bitpacked_u8/unpack/3bw[100M] 352.3 µs 298.6 µs +17.98%

Comparing dk/verify-bytes-from-read-at-implementation (a7c4640) with develop (f307edc)

Open in CodSpeed

Comment thread vortex-file/src/read/request.rs Outdated
Copy link
Copy Markdown
Contributor

@a10y a10y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you think?

danking added 4 commits May 4, 2026 13:58
Signed-off-by: Daniel King <dan@spiraldb.com>
Signed-off-by: Daniel King <dan@spiraldb.com>
Signed-off-by: Daniel King <dan@spiraldb.com>
Signed-off-by: Daniel King <dan@spiraldb.com>
@danking danking requested a review from a10y May 4, 2026 18:12
@danking danking added the feature A feature request label May 4, 2026
}

impl CoalescedRequest {
pub fn try_new(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would also be ok with this panicking since passing a request that is outside of the coalescing window is an implementer error. but this is fine

Comment thread vortex-file/src/read/request.rs Outdated
Comment on lines +153 to +162
if req.offset < range.start {
vortex_bail!(
"CoalescedRequest: sub-request for length {} at file offset {} precedes coalesced range: {}..{}. {:?}",
req.length,
req.offset,
range.start,
range.end,
req,
)
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: there's the vortex_ensure! macro for this pattern

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

@a10y a10y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optional nit, i think you probably need to regen lockfiles as well

Comment on lines +181 to +183
pub fn requests(&self) -> &[ReadRequest] {
&self.requests
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Java?? ☕ ⚰️

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's the only way to have read-only public fields so I can enforce my invariants.

Signed-off-by: Daniel King <dan@spiraldb.com>
@danking danking enabled auto-merge (squash) May 6, 2026 15:12
danking added 2 commits May 6, 2026 16:49
Signed-off-by: Daniel King <dan@spiraldb.com>
Signed-off-by: Daniel King <dan@spiraldb.com>
@danking danking added the changelog/feature A new feature label May 6, 2026
@danking danking merged commit ab8a199 into develop May 6, 2026
65 of 67 checks passed
@danking danking deleted the dk/verify-bytes-from-read-at-implementation branch May 6, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/feature A new feature feature A feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants