Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
conduwuit
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
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
🥺
conduwuit
Commits
bade4ed1
Commit
bade4ed1
authored
1 year ago
by
Jason Volk
Committed by
🥺
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
conf item to toggle periodic cleanup for rocksdb
Signed-off-by:
Jason Volk
<
jason@zemos.net
>
parent
865b5d72
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
conduwuit-example.toml
+5
-0
5 additions, 0 deletions
conduwuit-example.toml
src/config/mod.rs
+3
-0
3 additions, 0 deletions
src/config/mod.rs
src/database/mod.rs
+4
-0
4 additions, 0 deletions
src/database/mod.rs
with
12 additions
and
0 deletions
conduwuit-example.toml
+
5
−
0
View file @
bade4ed1
...
@@ -441,6 +441,11 @@ url_preview_check_root_domain = false
...
@@ -441,6 +441,11 @@ url_preview_check_root_domain = false
# Defaults to 1 (TolerateCorruptedTailRecords)
# Defaults to 1 (TolerateCorruptedTailRecords)
#rocksdb_recovery_mode = 1
#rocksdb_recovery_mode = 1
# Controls whether memory buffers are written to storage at the fixed interval set by `cleanup_period_interval`
# even when they are not full. Setting this will increase load on the storage backplane and is never advised
# under normal circumstances.
#rocksdb_periodic_cleanup = false
### Domain Name Resolution and Caching
### Domain Name Resolution and Caching
...
...
This diff is collapsed.
Click to expand it.
src/config/mod.rs
+
3
−
0
View file @
bade4ed1
...
@@ -211,6 +211,8 @@ pub struct Config {
...
@@ -211,6 +211,8 @@ pub struct Config {
pub
rocksdb_repair
:
bool
,
pub
rocksdb_repair
:
bool
,
#[serde(default)]
#[serde(default)]
pub
rocksdb_read_only
:
bool
,
pub
rocksdb_read_only
:
bool
,
#[serde(default)]
pub
rocksdb_periodic_cleanup
:
bool
,
pub
emergency_password
:
Option
<
String
>
,
pub
emergency_password
:
Option
<
String
>
,
...
@@ -635,6 +637,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
...
@@ -635,6 +637,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
(
"RocksDB Recovery Mode"
,
&
self
.rocksdb_recovery_mode
.to_string
()),
(
"RocksDB Recovery Mode"
,
&
self
.rocksdb_recovery_mode
.to_string
()),
(
"RocksDB Repair Mode"
,
&
self
.rocksdb_repair
.to_string
()),
(
"RocksDB Repair Mode"
,
&
self
.rocksdb_repair
.to_string
()),
(
"RocksDB Read-only Mode"
,
&
self
.rocksdb_read_only
.to_string
()),
(
"RocksDB Read-only Mode"
,
&
self
.rocksdb_read_only
.to_string
()),
(
"RocksDB Periodic Cleanup"
,
&
self
.rocksdb_periodic_cleanup
.to_string
()),
(
"Prevent Media Downloads From"
,
{
(
"Prevent Media Downloads From"
,
{
let
mut
lst
=
vec!
[];
let
mut
lst
=
vec!
[];
for
domain
in
&
self
.prevent_media_downloads_from
{
for
domain
in
&
self
.prevent_media_downloads_from
{
...
...
This diff is collapsed.
Click to expand it.
src/database/mod.rs
+
4
−
0
View file @
bade4ed1
...
@@ -545,6 +545,10 @@ async fn start_cleanup_task() {
...
@@ -545,6 +545,10 @@ async fn start_cleanup_task() {
}
}
fn
perform_cleanup
()
{
fn
perform_cleanup
()
{
if
!
services
()
.globals.config.rocksdb_periodic_cleanup
{
return
;
}
let
start
=
Instant
::
now
();
let
start
=
Instant
::
now
();
if
let
Err
(
e
)
=
services
()
.globals
.cleanup
()
{
if
let
Err
(
e
)
=
services
()
.globals
.cleanup
()
{
error!
(
target
:
"database-cleanup"
,
"Ran into an error during cleanup: {}"
,
e
);
error!
(
target
:
"database-cleanup"
,
"Ran into an error during cleanup: {}"
,
e
);
...
...
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