Skip to content

Commit

Permalink
Fix unseen closed shard notification
Browse files Browse the repository at this point in the history
  • Loading branch information
guilload committed Mar 8, 2024
1 parent b290a10 commit 5ea63a6
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions quickwit/quickwit-ingest/src/ingest_v2/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ impl IngesterShard {
now: Instant,
) -> Self {
let shard_status = (shard_state, replication_position_inclusive.clone());
let (shard_status_tx, shard_status_rx) = watch::channel(shard_status);
let (shard_status_tx, mut shard_status_rx) = watch::channel(shard_status);
shard_status_rx.mark_changed();

Self {
shard_type: IngesterShardType::Primary { follower_id },
shard_state,
Expand All @@ -79,7 +81,9 @@ impl IngesterShard {
now: Instant,
) -> Self {
let shard_status = (shard_state, replication_position_inclusive.clone());
let (shard_status_tx, shard_status_rx) = watch::channel(shard_status);
let (shard_status_tx, mut shard_status_rx) = watch::channel(shard_status);
shard_status_rx.mark_changed();

Self {
shard_type: IngesterShardType::Replica { leader_id },
shard_state,
Expand All @@ -98,7 +102,9 @@ impl IngesterShard {
now: Instant,
) -> Self {
let shard_status = (shard_state, replication_position_inclusive.clone());
let (shard_status_tx, shard_status_rx) = watch::channel(shard_status);
let (shard_status_tx, mut shard_status_rx) = watch::channel(shard_status);
shard_status_rx.mark_changed();

Self {
shard_type: IngesterShardType::Solo,
shard_state,
Expand Down

0 comments on commit 5ea63a6

Please sign in to comment.