Skip to content

print IOPS#6089

Open
cmccabe wants to merge 2 commits intolance-format:mainfrom
cmccabe:colin_print_iops
Open

print IOPS#6089
cmccabe wants to merge 2 commits intolance-format:mainfrom
cmccabe:colin_print_iops

Conversation

@cmccabe
Copy link
Copy Markdown
Contributor

@cmccabe cmccabe commented Mar 3, 2026

No description provided.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 3, 2026

ACTION NEEDED
Lance follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

For details on the error please inspect the "PR Title Check" action.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 3, 2026

PR Review

P0 - Unconditional log::info! with debug/profiling data in production code path

This PR adds unconditional log::info! output to merge_index_metadata, which is a user-facing API method. Logging IOPS stats at info level means every caller of this function will see this output in their logs. This looks like a debugging/profiling aid that should not be merged as-is.

Suggestions:

  • If this is temporary instrumentation, consider keeping it behind log::debug! or log::trace! instead.
  • If this is intended as permanent observability, it should go through the project's established metrics/tracing infrastructure rather than ad-hoc log::info!.

P1 - Format specifier bug

The format string for bytes_read_per_sec uses {:3} (minimum width 3, no decimal) instead of {:.3} (3 decimal places), which is inconsistent with the iops_per_sec format and likely not the intended behavior for a floating-point value.

// Current (likely a typo):
log::info!("... bytes read/s: {:3}", ..., bytes_read_per_sec);
// Probably intended:
log::info!("... bytes read/s: {:.3}", ..., bytes_read_per_sec);

P1 - Division by zero if elapsed time is 0

If the operation completes in under a nanosecond (unlikely but possible in tests with mocked/fast storage), secs will be 0.0 and the division produces inf or NaN. Consider guarding against this.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 3, 2026

Codecov Report

❌ Patch coverage is 70.58824% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
rust/lance/src/dataset.rs 42.85% 4 Missing ⚠️
rust/lance/src/index/vector/ivf.rs 90.00% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant