Open sukesh9995 opened 1 month ago
My guess is that you have a single thread (single subscriptions structure) handling both retrieving the state data and handling the notification. When you send the notification, these 2 events block each other and you get the timeout. Use 2 threads/subscription structures and it will work.
Thanks for the fast reply. Yes I am using single thread. Let me try 2 thread.
Hi @michalvasko
I am getting this error when I try send notification which has a reference link.
sr_notif_send_tree failed EV ORIGIN: SHM event "oper get" ID 3 processing timed out. sr_notif_send_tree failed EV ORIGIN: SHM event "oper get" ID 4 processing timed out.
yang tree looks like this
notifications: +---n download-event | +--ro file-name string | +--ro status? enumeration | +--ro error-message? string +---n install-event | +--ro slot-name? -> /software-inventory/software-slot/name | +--ro status? enumeration | +--ro error-message? string +---n activation-event +--ro slot-name? -> /software-inventory/software-slot/name +--ro status? enumeration +--ro return-code? uint8 +--ro error-message? string
download-even notifications works fine but install-even and activation-event throws error.
this is how I am sending the notification. sr_val_t notif = calloc(1, 2 sizeof(sr_val_t)); notif[0].xpath = "/o-ran-software-management:install-event/slot-name"; notif[0].type = SR_STRING_T; notif[0].data.string_val = strdup("SLOT0"); notif[1].xpath = "/o-ran-software-management:install-event/status"; notif[1].type = SR_STRING_T; notif[1].data.string_val = strdup("COMPLETED");
Before sending notification I am doing a get operation on /software-inventory.
Please let me know why i am getting error while sending notification.
Regards, Sukesh