Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/cpp/rtps/writer/StatefulWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1453,6 +1453,16 @@ void StatefulWriter::check_acked_status()
}
);

// In situation that there are recently matched readers to the writer has not yet
// sent changes, both 'min_low_mark = zero' and 'all_acked == true' will be met.
// In this scenario, onWriterChangeReceivedByAll() will be skipped for the acked
// changes, that causes the changes to remain in history indefinitely.
// To prevent this condition, clip min_low_mark to handle the acked changes.
if (all_acked)
{
min_low_mark = history_->next_sequence_number() - 1;
}

bool something_changed = all_acked;
SequenceNumber_t min_seq = get_seq_num_min();
if (min_seq != SequenceNumber_t::unknown())
Expand Down
Loading