The sequence number of broadcast message is associated with a specific 
destination not all destinations, therefore the loss indication shouldn't check 
those broadcast messages.
The messages received before subscribing the service shouldn't be checked too, 
because those messages wasn't tracked by mds.
---
 src/mds/mds_c_sndrcv.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/src/mds/mds_c_sndrcv.c b/src/mds/mds_c_sndrcv.c
index c3002a5fd..ee9dd3569 100644
--- a/src/mds/mds_c_sndrcv.c
+++ b/src/mds/mds_c_sndrcv.c
@@ -4691,7 +4691,23 @@ uint32_t mds_mcm_ll_data_rcv(MDS_DATA_RECV *recv)
                                            recv->dest_svc_hdl,
                                            recv->src_svc_id, recv->src_vdest,
                                            recv->src_adest, &lcl_subtn_res)) {
-                       if (recv->src_seq_num != lcl_subtn_res->msg_rcv_cnt) {
+                       if (recv->snd_type == MDS_SENDTYPE_BCAST
+                                       || recv->snd_type == 
MDS_SENDTYPE_RBCAST) {
+                               // The sequence number of broadcast message is 
associated
+                               // with a specific destination not all 
destinations. Because
+                               // it isn't reliable, this message is skipped 
by resetting
+                               // the message count.
+                               lcl_subtn_res->msg_rcv_cnt = 0;
+                       } else if (lcl_subtn_res->msg_rcv_cnt == 0) {
+                               // This is the first message received after 
subscribing
+                               // the sender service or receiving a broadcast 
message,
+                               // therefore the message count is initialized 
here.
+                               // Note: all messages received before 
subscribing the
+                               // sender service was not tracked so skip 
checking those
+                               // messages.
+                               lcl_subtn_res->msg_rcv_cnt = recv->src_seq_num;
+                               lcl_subtn_res->msg_rcv_cnt++;
+                       } else if (recv->src_seq_num != 
lcl_subtn_res->msg_rcv_cnt) {
                                m_MDS_LOG_ERR(
                                    "MDS_SND_RCV: msg loss detected, Src svc_id 
= %s(%d),"
                                    " Src vdest id= %d, Src Adest = %" PRIu64 
","
-- 
2.25.1



_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to