From 0a56cb29202bf06e00f4152fd5cd2b59a19e1c88 Mon Sep 17 00:00:00 2001 From: Odysseas Gabrielides Date: Wed, 29 May 2024 11:24:34 +0300 Subject: [PATCH] use is_sync_completed in tutorial --- tutorials/src/bin/replication.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tutorials/src/bin/replication.rs b/tutorials/src/bin/replication.rs index 6db03af0..440cb64e 100644 --- a/tutorials/src/bin/replication.rs +++ b/tutorials/src/bin/replication.rs @@ -252,8 +252,10 @@ fn sync_db_demo( chunk_queue.extend(more_chunks); } - target_db.commit_session(session); - + if session.is_sync_completed() { + target_db.commit_session(session); + } + Ok(()) }