- The issue is IMMD fail to send mcast message to any IMMND with
error "Resource temporarily unavailable" and current MDS only loop
for each destination once, may lead to break loop without any success.
- Improve MDS to loop until one success send mcast message.
Currently not retry in case tipc unicast, will consider later if any.
---
 src/mds/mds_c_sndrcv.c | 27 +++++++++++++++++++++++----
 1 file changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/mds/mds_c_sndrcv.c b/src/mds/mds_c_sndrcv.c
index 557f68a4b..2dc653348 100644
--- a/src/mds/mds_c_sndrcv.c
+++ b/src/mds/mds_c_sndrcv.c
@@ -4453,18 +4453,33 @@ static uint32_t mcm_pvt_process_svc_bcast_common(
 
        to_msg.bcast_buff_len = 0;
        /* Get each destination and send */
+       bool mcast_retry = false;
        while (1) {
                if (flag == 0) {
                        if (NCSCC_RC_SUCCESS !=
                            mds_subtn_res_tbl_getnext_active(
                                svc_cb->svc_hdl, to_svc_id, &info_result)) {
-                               break;
+                               if (!mcast_retry) break;
+                               info_result = NULL;
+                               if (NCSCC_RC_SUCCESS !=
+                                   mds_subtn_res_tbl_getnext_active(
+                                       svc_cb->svc_hdl, to_svc_id, 
&info_result)) {
+                                       m_MDS_LOG_ERR("MDTM: Failed to send 
broadcast");
+                                       break;
+                               }
                        }
                } else if (flag == 1) {
                        if (NCSCC_RC_SUCCESS !=
                            mds_subtn_res_tbl_getnext_any(
                                svc_cb->svc_hdl, to_svc_id, &info_result)) {
-                               break;
+                               if (!mcast_retry) break;
+                               info_result = NULL;
+                               if (NCSCC_RC_SUCCESS !=
+                                   mds_subtn_res_tbl_getnext_any(
+                                       svc_cb->svc_hdl, to_svc_id, 
&info_result)) {
+                                       m_MDS_LOG_ERR("MDTM: Failed to send red 
broadcast");
+                                       break;
+                               }
                        }
                }
 
@@ -4480,7 +4495,7 @@ static uint32_t mcm_pvt_process_svc_bcast_common(
                                        info_result->key.vdest_id,
                                        req->i_sendtype, 0, pri)) {
                                        m_MDS_LOG_ERR(
-                                           "MDS_SND_RCV: Queueing in await 
active table failed\n");
+                                           "MDTM: Queueing in await active 
table failed\n");
                                }
                                continue;
                        }
@@ -4515,11 +4530,15 @@ static uint32_t mcm_pvt_process_svc_bcast_common(
                            m_MDS_GET_SVC_ID_FROM_SVC_HDL(svc_cb->svc_hdl),
                            to_msg.bcast_buff_len);
                        if (status == NCSCC_RC_SUCCESS) {
+                               if (mcast_retry)
+                                       m_MDS_LOG_NOTIFY("MDTM: status = 
mds_mcm_send_msg_enc = NCSCC_RC_SUCCESS");
                                /* Break after one successful Mcast message */
                                break;
-                       } else
+                       } else {
+                               mcast_retry = true;
                                m_MDS_LOG_ERR(
                                    "MDTM:Continue while(1) status = 
mds_mcm_send_msg_enc = NCSCC_RC_FAILURE");
+                       }
                }
 
                m_MDS_LOG_DBG(
-- 
2.17.1



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

Reply via email to