It becomes trickier to handle timeout scenarios within the agent library
threads.
The application designer may not like asserts from OpenSAF library.
Returning an error code (SA_AIS_ERR_NO_RESOURCES) could be an option, but
the error code doesn't accurately reflects the situation if the timeout
occurred because of a transient situation even though the user an decide to
reInitialize the library at a later point of time.
As you mentioned, we should perhaps just revisit this topic if such a
timeout situation arises(at all)...

Ack,
Mathi.

On Tue, Oct 15, 2019 at 8:59 PM Jones, Alex <ajo...@rbbn.com> wrote:

> Hi Mathi,
>
>     See my comments inline.
>
> Alex
>
> On 10/15/19 12:45 PM, Mathi N P wrote:
> ________________________________
> NOTICE: This email was received from an EXTERNAL sender
> ________________________________
>
>
> Hi Alex,
>
> I only have a couple of things to discuss, the rest of the changes are
> fine.
>
> 1) Performing mqa_mds_reregister_queues() in a separate thread(inside the
> application process), iam not yet sure about
> synchronization issues this might throw with the MDS thread
> [Alex] I tried this originally, but this is currently on the mds thread.
> So, because we are using a sync call we can never get the return because we
> are calling this from the mds thread. That's why I created a separate
> thread. I did create a sync with msgnd, so that API calls can only continue
> when we know that msgnd has synced all of its queues with msgd.
> 2) In the below call, there is likelihood of the MDS send timing out
> (extreme case?). Should we handle the timeout error code from the MDS send?
> + /* send the request to the MQND */
> + uint32_t rc(mqa_mds_msg_sync_send(mqa_cb->mqa_mds_hdl,
> + &mqa_cb->mqnd_mds_dest,
> + &cap_evt, &out_evt, MQSV_WAIT_TIME));
> +
> + mqa_cb = m_MQSV_MQA_RETRIEVE_MQA_CB;
> +
> + if (rc != NCSCC_RC_SUCCESS)
> [Alex] How should we handle a timeout? Retry a few times? Assert? I put
> the LOG_ER in there, so we can see if it ever happens, and deal with it at
> that point. I haven't seen this in my testing.
>
> Thanks,
> Mathi.
>
>
> On Thu, Oct 10, 2019 at 6:19 PM Jones, Alex <ajo...@rbbn.com<mailto:
> ajo...@rbbn.com>> wrote:
> Fix whitespace issues
> ---
> src/msg/apitest/test_CapacityThresholds.cc | 2 +-
> src/msg/msgd/mqd_saf.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/msg/apitest/test_CapacityThresholds.cc
> b/src/msg/apitest/test_CapacityThresholds.cc
> index eb5dda1dc..971c8ae90 100644
> --- a/src/msg/apitest/test_CapacityThresholds.cc
> +++ b/src/msg/apitest/test_CapacityThresholds.cc
> @@ -50,7 +50,7 @@ static SaAisErrorT msgInitialize(SaMsgHandleT *msgHandle,
> SaVersionT *version)
> {
> SaAisErrorT rc(SA_AIS_OK);
> -
> +
> while (true) {
> rc = saMsgInitialize(msgHandle, 0, version);
>
> diff --git a/src/msg/msgd/mqd_saf.c b/src/msg/msgd/mqd_saf.c
> index 846755ba7..895a4852d 100644
> --- a/src/msg/msgd/mqd_saf.c
> +++ b/src/msg/msgd/mqd_saf.c
> @@ -64,7 +64,7 @@ static void get_q_groups_from_imm(MQD_CB *pMqd)
> SaVersionT version = { 'A', 2, 15 };
>
> error = immutil_saImmOmInitialize(&immHandle, 0, &version);
> -
> +
> if (error != SA_AIS_OK) {
> LOG_ER("saImmOmInitialize failed %u", error);
> break;
> --
> 2.20.1
>
>
> ________________________________
> Notice: This e-mail together with any attachments may contain information
> of Ribbon Communications Inc. that is confidential and/or proprietary for
> the sole use of the intended recipient. Any review, disclosure, reliance or
> distribution by others or forwarding without express permission is strictly
> prohibited. If you are not the intended recipient, please notify the sender
> immediately and then delete all copies, including any attachments.
> ________________________________
>

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

Reply via email to