Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Vaultwarden
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Vaultwarden
Commits
4df686f4
Commit
4df686f4
authored
6 years ago
by
Miroslav Prasil
Browse files
Options
Downloads
Patches
Plain Diff
Add an option to not enable WAL (should help in #399)
parent
d7eeaaf2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/config.rs
+3
-0
3 additions, 0 deletions
src/config.rs
src/main.rs
+7
-5
7 additions, 5 deletions
src/main.rs
with
10 additions
and
5 deletions
src/config.rs
+
3
−
0
View file @
4df686f4
...
...
@@ -253,6 +253,9 @@ make_config! {
extended_logging
:
bool
,
false
,
def
,
true
;
/// Log file path
log_file
:
String
,
false
,
option
;
/// Enable DB WAL |> Turning this off might lead to worse performance, but might help if using bitwarden_rs on some exotic filesystems, that do not support WAL
enable_db_wal
:
bool
,
false
,
def
,
true
;
},
/// Yubikey settings
...
...
This diff is collapsed.
Click to expand it.
src/main.rs
+
7
−
5
View file @
4df686f4
...
...
@@ -168,11 +168,13 @@ fn check_db() {
}
// Turn on WAL in SQLite
use
diesel
::
RunQueryDsl
;
let
connection
=
db
::
get_connection
()
.expect
(
"Can't conect to DB"
);
diesel
::
sql_query
(
"PRAGMA journal_mode=wal"
)
.execute
(
&
connection
)
.expect
(
"Failed to turn on WAL"
);
if
CONFIG
.enable_db_wal
()
{
use
diesel
::
RunQueryDsl
;
let
connection
=
db
::
get_connection
()
.expect
(
"Can't conect to DB"
);
diesel
::
sql_query
(
"PRAGMA journal_mode=wal"
)
.execute
(
&
connection
)
.expect
(
"Failed to turn on WAL"
);
}
}
fn
check_rsa_keys
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment