-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix (btree) clear_overflow_page
#971
base: main
Are you sure you want to change the base?
Fix (btree) clear_overflow_page
#971
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left some minor comments
core/storage/btree.rs
Outdated
log::info!( | ||
"After inserts:\n{}", | ||
format_btree(pager.clone(), root_page, 0) | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be lower log level like trace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
core/storage/btree.rs
Outdated
for &(key, size, _) in sequence.iter() { | ||
let key = OwnedValue::Integer(key); | ||
let value = Record::new(vec![OwnedValue::Blob(Rc::new(vec![0; size]))]); | ||
log::info!("Inserting key: {}", key); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
SQLite does floor division but clippy erroneously says its floor division. Ignore clippy warning.
The previous version when tested with large blobs was breaking invariants.
Added large blobs to try and break delete.
d786340
to
a1143f7
Compare
@pereman2 I've added the requested changes. The reason for this PR: When I have added the fuzz test it has triggered some asserts in the |
This PR fixes bugs in
clear_overflow_page
implementation.