Remove "error:" prefix to SQLite warning message#10319
Remove "error:" prefix to SQLite warning message#10319jfroche wants to merge 1 commit intoNixOS:masterfrom
Conversation
Avoid the confusing error message "warning: error: ..." when SQLite is busy. Instead, just print "warning: ..." as the message. Fixes NixOS#6656
|
Wouldn't this work: diff --git a/src/libstore/sqlite.cc b/src/libstore/sqlite.cc
index 06abfb90b..efe15b21b 100644
--- a/src/libstore/sqlite.cc
+++ b/src/libstore/sqlite.cc
@@ -249,7 +249,7 @@ void handleSQLiteBusy(const SQLiteBusy & e, time_t & nextWarning)
if (now > nextWarning) {
nextWarning = now + 10;
logWarning({
- .msg = HintFmt(e.what())
+ .msg = e.info().msg
});
}
|
|
Yeah please try @edolstra's fix. We want to treat the underlying disease (double rendering of error message) not the symptom (double level prefix). |
|
(off topic)
Also what's causing starvation for over 10 seconds? Maybe |
|
@roberth I think only subsequent warnings take 10 seconds. The first "busy" warning is printed immediately. |
Ah, we were both wrong. First warning is after 1 second, and subsequent ones happen after 10 second intervals. Starvation for 1 second is still bad though. We'll need more info to really solve this. A quick search doesn't reveal a way to get useful info out of the WAL, so maybe we should do our own logging to a file, and add timestamps so that we can figure out after the fact what was blocking us. |
|
Just trying to get to the bottom of it. #10319 (comment) is still a good suggestion to move this PR forward. |
Avoid the confusing error message "warning: error: SQLite database '/nix/var/nix/db/db.sqlite' is busy". Instead, just print "warning: ..." as the message.
Fixes #6656
Priorities and Process
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.