Skip to content

Commit bf55114

Browse files
authored
ref(apply): Remove unwrap in the apply loop (#368)
1 parent 84bd64f commit bf55114

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

etl/src/replication/apply.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,11 @@ where
554554
// Table sync workers signal when they complete initial data copying and are ready
555555
// to transition to continuous replication mode. Guard the branch so it stays
556556
// dormant if no signal receiver was provided.
557-
_ = force_syncing_tables_rx.as_mut().unwrap().changed(), if force_syncing_tables_rx.is_some() => {
557+
_ = async {
558+
if let Some(rx) = force_syncing_tables_rx.as_mut() {
559+
let _ = rx.changed().await;
560+
}
561+
}, if force_syncing_tables_rx.is_some() => {
558562
// Table state transitions can only occur at transaction boundaries to maintain consistency.
559563
// If we're in the middle of processing a transaction (remote_final_lsn is set),
560564
// we defer the sync processing until the current transaction completes.

0 commit comments

Comments
 (0)