Hi all, have some below queries regarding CDB subscription and read,
- if we subscribe root path and sub path with different priorities, the root path changes in DB results two subscription get hit under polling , so we need to send cdb_sync_subscription for both sub_points right? if we miss sending cdb_sync_subscription, confd transcation will be under lock , is my undertsaning correct here?
- For each sub points we need send cdb_sync_subscription otherwise transactions at confd will be locked right?
- can we use same priority to different sub points (one subpoint is rootpath and another is its sub paths)? if we use same priority any issues possible?
- In any case below code else part will get hit?
if ((set[0].revents & POLLIN))
{
int sub_points[2];
int reslen = 0;
int status = 0;
status = cdb_read_subscription_socket(confd_oper_subs_socket,
sub_points, &reslen);
for (int idx = 0; idx < reslen ; ++idx)
{
if(sub_points[idx] == subpoin1)
{
cdb_iterate()
cdb_sync_sub()
}
else if(sub_point[idx] == subpoin2)
{
cdb_iterate()
cdb_sync_sub()
}
else
{
std::cout << "no sub points matched"<< std::endl; --> this will hit in any scenario?
}
}
}
Thanks in advance