-
Notifications
You must be signed in to change notification settings - Fork 299
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
Initial support for wal_checkpoint pragma #694
Conversation
e466847
to
807e0f4
Compare
The build on windows failed because Will need to look for a way to not building the cli tests in
|
3ebde0c
to
465f14f
Compare
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.
We already have infrastructure for WAL checkpointing so please just wire it up in this PR.
@penberg yeah, it makes sense. Let me bundle them. |
f6e4c48
to
aaaa6dc
Compare
aaaa6dc
to
f8f9f09
Compare
@penberg this PR ready for review again now. Thanks. |
Updated the PR title and description to reflect the change more accurately Part of #696, more info and todos mentioned in the issue. |
f8f9f09
to
e45a807
Compare
/// rexpect does not work on Windows. | ||
/// https://github.com/rust-cli/rexpect/issues/11 | ||
#[cfg(not(target_os = "windows"))] | ||
mod tests { |
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.
There's testing/shelltests.py
for CLI tests
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.
Hi @penberg, yes I was aware of the python test.
My rationals of adding tests written in Rust
- these are targeted to be integration tests for like wal features (similar to the TCL concurrency tests for WAL), not only cli. For example, have multiple processes connecting to database and asserts the wal behaviors through CLI interfaces.
- dev in rust, integration test in rust. no context switching to python (shelltests.py) or TCL. use cargo for all.
- advanced testing features (concurrency in tcl tests, etc.) in Rust instead of TCL.
- adding more advanced concurrency tests later (complex ones in TCL for example, not only for
wal
)
I'm a bit hesitant to expand the integration tests in python, that's why I decided to go with Rust.
I'm fine with porting if the overall direction of the project is to go with Python for these advanced integration tests via shell interface.
Let me know your thoughts.
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.
I am just bit hesitant of adding yet another test harness. That said, if we move all the integration tests to a top-level tests
directory similar to what Deno, for example, does, I guess it's fine.
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.
makes sense. let me centralize them in another PR.
// 2nd col: # modified pages written to wal file | ||
state.registers[*dest + 1] = OwnedValue::Integer(0); | ||
// 3rd col: # pages moved to db after checkpoint | ||
state.registers[*dest + 2] = OwnedValue::Integer(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.
Why set all of these to zeros? Is there some problem with checkpoint()
not returning enough information?
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.
Correct, checkpoint currently does not return necessary info. I noted in the TODO for another issue and PR to resolve it.
hard-coding 2nd and 3rd cols for now because checkpoint result does not provide these info. TODO recorded in #696.
Wire pragma wal_checkpoint to checkpoint infra
pragma wal_checkpoint;
virtual machine
Part of #696.
Before
After