Hi aThuan

NTFD just prioritize to handle the MDS_DOWN first. The notification will be
handled later and will be logged to log file.

The ticket is defect ticket. I updated the ticket a little bit.

Regards
Canh

-----Original Message-----
From: Tran Thuan <thuan.t...@dektech.com.au> 
Sent: Wednesday, November 28, 2018 10:39 AM
To: 'Canh Van Truong' <canh.v.tru...@dektech.com.au>; 'Lennart Lund'
<lennart.l...@ericsson.com>; 'Minh Hon Chau' <minh.c...@dektech.com.au>
Cc: opensaf-devel@lists.sourceforge.net
Subject: RE: [devel] [PATCH 1/1] ntf: Increase the priority when sending
MDS_DOWN to NTFD maind thread [#2973]

Hi Canh,

I just wonder if any notification miss cause by this change?
Example:
  Agent send notification then it terminate.
  Will NTFD handle Agent DOWN then skip notification already received from
Agent?

Also, what is the problem/consequence of current behavior? Is ticket a
defect or an enhancement?
Make clear what is defect or what improve with new change?

Best Regards,
ThuanTr

-----Original Message-----
From: Canh Van Truong <canh.v.tru...@dektech.com.au> 
Sent: Wednesday, November 28, 2018 10:12 AM
To: 'Lennart Lund' <lennart.l...@ericsson.com>; 'Minh Hon Chau'
<minh.c...@dektech.com.au>
Cc: opensaf-devel@lists.sourceforge.net
Subject: Re: [devel] [PATCH 1/1] ntf: Increase the priority when sending
MDS_DOWN to NTFD maind thread [#2973]

Thanks Lennart,

Yes, I sent with wrong patch. This patch was including my testing. 
The solution  just increases the priority  when sending the MDS_DOWN event.
I am sending the right.

Regards
Canh


-----Original Message-----
From: Lennart Lund <lennart.l...@ericsson.com>
Sent: Tuesday, November 27, 2018 10:40 PM
To: Canh Van Truong <canh.v.tru...@dektech.com.au>; Minh Hon Chau
<minh.c...@dektech.com.au>
Cc: opensaf-devel@lists.sourceforge.net; Canh Van Truong
<canh.v.tru...@dektech.com.au>; Lennart Lund <lennart.l...@ericsson.com>
Subject: RE: [PATCH 1/1] ntf: Increase the priority when sending MDS_DOWN to
NTFD maind thread [#2973]

Hi Canh,

Ack, with comments see [Lennart] below. I have not tested I cannot say if
this is a good solution or not.

Thanks
Lennart

-----Original Message-----
From: Canh Van Truong <canh.v.tru...@dektech.com.au>
Sent: den 27 november 2018 14:17
To: Lennart Lund <lennart.l...@ericsson.com>; Minh Hon Chau
<minh.c...@dektech.com.au>
Cc: opensaf-devel@lists.sourceforge.net; Canh Van Truong
<canh.v.tru...@dektech.com.au>
Subject: [PATCH 1/1] ntf: Increase the priority when sending MDS_DOWN to
NTFD maind thread [#2973]

When the sending notification request come to NTFD , they are put in the mbx
to wait for being processed. if client of these request is down, MDS thread
receive the event down and also put to mbx. The priority of event down and
send request are the same. So NTF will process the send request before the
event down.

The patch increases the priority when puting the MDS_DOWN event to main
thread
---
 src/dtm/transport/transportd.conf | 4 ++--
 src/ntf/ntfd/NtfAdmin.cc          | 5 +++++
 src/ntf/ntfd/ntfs_mds.c           | 2 +-
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/dtm/transport/transportd.conf
b/src/dtm/transport/transportd.conf
index 23e87a0a1..10e41338b 100644
--- a/src/dtm/transport/transportd.conf
+++ b/src/dtm/transport/transportd.conf
@@ -4,10 +4,10 @@
[Lennart] This has nothing to do with the problem. Also it does not seems to
do anything. The new values are the same as the default.
If this change is relevant in some way it must be documented why it is
needed at least in the commit message.
Otherwise revert the change.
 # TRANSPORT_MAX_FILE_SIZE: The  maximum size of the log file. The size
value should  # be in Bytes i.e if you want to give 5 MB please mention it
as 5242880. it is treated  # as 5 MB. By default value will be 5242880 Bytes
-#TRANSPORT_MAX_FILE_SIZE=5242880
+TRANSPORT_MAX_FILE_SIZE=52428800
 
 #
 # TRANSPORT_MAX_BACKUPS: Number of backup files to maintain. Log rotation
will  # be done based on this value. Default value will be 9  # i.e totally
10 log files will be maintain.
-#TRANSPORT_MAX_BACKUPS=9
+TRANSPORT_MAX_BACKUPS=9
diff --git a/src/ntf/ntfd/NtfAdmin.cc b/src/ntf/ntfd/NtfAdmin.cc index
2cb99457c..f0996f487 100644
--- a/src/ntf/ntfd/NtfAdmin.cc
+++ b/src/ntf/ntfd/NtfAdmin.cc
@@ -200,10 +200,15 @@ void NtfAdmin::processNotification(unsigned int
clientId,
   sendNotificationUpdate(clientId, notification->getNotInfo());
 
   ClientMap::iterator pos;
[Lennart] Seems to be some test printouts that you have used when
testing/debugging. Shall probably be removed.
+  int enc = 0;
   for (pos = clientMap.begin(); pos != clientMap.end(); pos++) {
+         TRACE("xcantru: %d", enc);
     NtfClient *client = pos->second;
+
     client->notificationReceived(clientId, notification, mdsCtxt);
+    enc++;
   }
+  TRACE("xcantru0: %d", enc);
 
   /* remove notification if sent to all subscribers and logged */
   if (notification->isSubscriptionListEmpty() && notification->loggedOk())
{ diff --git a/src/ntf/ntfd/ntfs_mds.c b/src/ntf/ntfd/ntfs_mds.c index
a4b4a5f09..bede30cef 100644
--- a/src/ntf/ntfd/ntfs_mds.c
+++ b/src/ntf/ntfd/ntfs_mds.c
@@ -954,7 +954,7 @@ static uint32_t mds_svc_event(struct
ncsmds_callback_info *info)
 
                        /* Push the event and we are done */
                        if (m_NCS_IPC_SEND(&ntfs_cb->mbx, evt,
-                                          NCS_IPC_PRIORITY_HIGH) !=
+                                          NCS_IPC_PRIORITY_VERY_HIGH) !=
                            NCSCC_RC_SUCCESS) {
                                TRACE("ipc send failed");
                                ntfs_evt_destroy(evt);
--
2.15.1




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




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

Reply via email to