diff --git a/core/lib.rs b/core/lib.rs
index 222dbcc84..7123620fc 100644
--- a/core/lib.rs
+++ b/core/lib.rs
@@ -520,7 +520,7 @@ impl Database {
is_nested_stmt: AtomicBool::new(false),
encryption_key: RwLock::new(None),
encryption_cipher_mode: RwLock::new(None),
- sync_mode: Cell::new(SyncMode::Full),
+ sync_mode: RwLock::new(SyncMode::Full),
data_sync_retry: AtomicBool::new(false),
busy_timeout: Cell::new(Duration::new(0, 0)),
});
@@ -1016,7 +1016,7 @@ pub struct Connection {
is_nested_stmt: AtomicBool,
encryption_key: RwLock