Skip to content

Commit 8d80077

Browse files
committed
remove useless busy loop
- we don't sleep in the busy_handler which is useless because SQLite just call busy handler in loop - after the removal we will use default 100ms busy handler timeout
1 parent 18f893e commit 8d80077

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

libsql-server/src/connection/connection_core.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use std::ffi::{c_int, c_void};
21
use std::path::{Path, PathBuf};
32
use std::sync::atomic::{AtomicBool, Ordering};
43
use std::sync::Arc;
@@ -88,18 +87,6 @@ impl<W: Wal + Send + 'static> CoreConnection<W> {
8887
config.max_row_size as i32,
8988
);
9089

91-
unsafe {
92-
const MAX_RETRIES: c_int = 8;
93-
extern "C" fn do_nothing(_: *mut c_void, n: c_int) -> c_int {
94-
(n < MAX_RETRIES) as _
95-
}
96-
libsql_sys::ffi::sqlite3_busy_handler(
97-
conn.handle(),
98-
Some(do_nothing),
99-
std::ptr::null_mut(),
100-
);
101-
}
102-
10390
let canceled = Arc::new(AtomicBool::new(false));
10491

10592
conn.progress_handler(100, {

0 commit comments

Comments
 (0)