You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently, due to a power outage, we noticed that our RocksDB database became corrupted.
While investigating a possible solution, we came across the following:
However, configuring this setting via an environment variable feels somewhat awkward and potentially unsafe in a multithreaded context.
Is there a way to set this parameter directly from Rust code instead?
Alternatively, is there another recommended option or setting that helps protect against data loss in the event of a sudden power failure?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Recently, due to a power outage, we noticed that our RocksDB database became corrupted.
While investigating a possible solution, we came across the following:
surrealdb/crates/core/src/kvs/rocksdb/mod.rs
Line 65 in d5134c7
This code sets a number of parameters, including SYNC_DATA, which is configured here:
surrealdb/crates/core/src/kvs/rocksdb/cnf.rs
Line 6 in d5134c7
via the environment variable SURREAL_SYNC_DATA.
However, configuring this setting via an environment variable feels somewhat awkward and potentially unsafe in a multithreaded context.
Is there a way to set this parameter directly from Rust code instead?
Alternatively, is there another recommended option or setting that helps protect against data loss in the event of a sudden power failure?
Beta Was this translation helpful? Give feedback.
All reactions