dqlite
dqlite copied to clipboard
Does handle_prepare need FAIL_IF_CHECKPOINTING?
@MathieuBordere and I were looking at gateway.c as part of working on something else, and he noticed that handle_exec
, handle_query
, handle_exec_sql
, and handle_query_sql
all have an initial check that throws an error if an SQLite checkpoint is in progress, while handle_prepare
doesn't have this check. We're not sure whether it should be added or not -- this issue tracks figuring that out.
Another question (for @freeekanayaka) is whether we still need FAIL_IF_CHECKPOINTING
at all.
edit (MathieuBordere): The question is, could we rely on the SQLite API's return values indicating the db is busy instead of implementing our own checks? We take all locks in the checkpoint anyway.
Another question (for @freeekanayaka) is whether we still need
FAIL_IF_CHECKPOINTING
at all.edit (MathieuBordere): The question is, could we rely on the SQLite API's return values indicating the db is busy instead of implementing our own checks? We take all locks in the checkpoint anyway.
I'm not entirely sure about this. It might be that after the checkpoint changes implemented by @MathieuBordere a while ago, this is unnecessary, but needs careful investigation.