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
A transaction 'on close' callback registered is not always called.
Environment
TypeDB distribution: Core, but it's a driver side bug.
TypeDB version: 2.25.7
Environment: Mac/Linux
Other details: Reproduced on C++ and rust drivers.
Reproducible Steps
Here is a modified rust integration test.
let session = Arc::new(Session::new(databases.get(common::TEST_DATABASE).await?, Data).await?);
let transaction = session.transaction(Read).await?;
let was_called = Arc::new(AtomicBool::new(false));
transaction.on_close({
let session = session.clone();
let was_called = was_called.clone();
move |_| {
was_called.store(true, Ordering::SeqCst);
session.force_close().ok();
}
});
transaction.force_close();
let mut n = 10;
while n > 0 {
if was_called.load(Ordering::SeqCst) {
break;
}
thread::sleep(time::Duration::from_millis(1000));
n -= 1;
}
assert_eq!(true, was_called.load(Ordering::SeqCst));
Expected result
The assert would pass.
The text was updated successfully, but these errors were encountered:
Description
A transaction 'on close' callback registered is not always called.
Environment
Reproducible Steps
Here is a modified rust integration test.
Expected result
The assert would pass.
The text was updated successfully, but these errors were encountered: