File tree Expand file tree Collapse file tree
src/cpp/fastdds/subscriber/history Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -215,8 +215,14 @@ bool DataReaderHistory::received_change_keep_all(
215215{
216216 if (!compute_key_for_change_fn_ (a_change))
217217 {
218- // Store the sample temporally only in ReaderHistory. When completed it will be stored in DataReaderHistory too.
219- return add_to_reader_history_if_not_full (a_change, rejection_reason);
218+ if (!a_change->is_fully_assembled ())
219+ {
220+ // Store the sample temporally only in ReaderHistory. When completed it will be stored in SubscriberHistory too.
221+ return add_to_reader_history_if_not_full (a_change, rejection_reason);
222+ }
223+
224+ rejection_reason = REJECTED_BY_INSTANCES_LIMIT ;
225+ return false ;
220226 }
221227
222228 bool ret_value = false ;
@@ -251,8 +257,14 @@ bool DataReaderHistory::received_change_keep_last(
251257{
252258 if (!compute_key_for_change_fn_ (a_change))
253259 {
254- // Store the sample temporally only in ReaderHistory. When completed it will be stored in SubscriberHistory too.
255- return add_to_reader_history_if_not_full (a_change, rejection_reason);
260+ if (!a_change->is_fully_assembled ())
261+ {
262+ // Store the sample temporally only in ReaderHistory. When completed it will be stored in SubscriberHistory too.
263+ return add_to_reader_history_if_not_full (a_change, rejection_reason);
264+ }
265+
266+ rejection_reason = REJECTED_BY_INSTANCES_LIMIT ;
267+ return false ;
256268 }
257269
258270 bool ret_value = false ;
You can’t perform that action at this time.
0 commit comments