Skip to content

fix: use logical OR instead of bitwise OR in conflict resolver#6492

Merged
Xuanwo merged 1 commit intolance-format:mainfrom
dentiny:hjiang/fix-typo
Apr 13, 2026
Merged

fix: use logical OR instead of bitwise OR in conflict resolver#6492
Xuanwo merged 1 commit intolance-format:mainfrom
dentiny:hjiang/fix-typo

Conversation

@dentiny
Copy link
Copy Markdown
Contributor

@dentiny dentiny commented Apr 13, 2026

Summary

Replace bitwise OR (|) with logical OR (||) in check_update_config_txn to enable short-circuit evaluation when checking for conflicting UpdateConfig transactions.

Context

In conflict_resolver.rs, the condition checking whether two UpdateConfig transactions conflict uses | (bitwise OR) instead of || (logical OR). While both produce the same boolean result, | always evaluates both operands.
Using || short-circuits on the first true, skipping the unnecessary call to modifies_same_metadata when upsert_key_conflict already determined a conflict.

Test plan

  • Existing tests pass (cargo test -p lance)

@github-actions
Copy link
Copy Markdown
Contributor

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.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@dentiny dentiny changed the title Fix typo fix: Fix typo for OR Apr 13, 2026
@github-actions github-actions Bot added the bug Something isn't working label Apr 13, 2026
@dentiny dentiny changed the title fix: Fix typo for OR fix: use logical OR instead of bitwise OR in conflict resolver Apr 13, 2026
@Xuanwo Xuanwo merged commit dabfb93 into lance-format:main Apr 13, 2026
33 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants