Skip to content

Conversation

@mheinzel
Copy link
Collaborator

@mheinzel mheinzel commented Feb 3, 2025

Description

Best reviewed commit by commit.

Fixes #550. Also does some refactoring. The new test catches the issue reliably, but requires a lot of boilerplate, with the definition of a new type. It might be possible to reduce that somewhat, e.g. by unifying the MTree and T datatype, but it's not clear that's worthwhile.

The final commit was part of an attempt to improve the situation, but currently is not really needed. It might still be a good direction to go in, allowing to handle invariant violations in a pure manner, instead of through exceptions. Should I keep it?

@mheinzel mheinzel changed the title Mheinzel/prototype fail Fix prototype issue with non-normalised, but structurally empty merging trees Feb 3, 2025
Also moves the expectCompletedMergingTree check into the invariant.
This currently does not change any behaviour, but once we call
treeInvariant elsewhere, this will now include expectCompleted...
This does not find any issues (or help find the #550 one), but is a
reasonable expectation.
This reliably finds the bug mentioned in #550, at the cost of some
boilerplate code.
This makes it easier to propagate the error information, for example to
report it as a quickcheck property failure with relevant context.
@mheinzel mheinzel force-pushed the mheinzel/prototype-fail branch from 0dcd56d to 5780ab4 Compare February 3, 2025 14:00
Copy link
Collaborator

@dcoutts dcoutts left a comment

Choose a reason for hiding this comment

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

LGTM!

@dcoutts dcoutts added this pull request to the merge queue Feb 6, 2025
Merged via the queue into main with commit cb3d0ce Feb 6, 2025
27 checks passed
@dcoutts dcoutts deleted the mheinzel/prototype-fail branch February 6, 2025 18:57
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.

[BUG] Failing QLS test in the lsm-prototypes-test test suite

3 participants