- status: open --> pending
The problem statement for this latest TCNOpen Release 2.0.2.0 was that we would be calling the tlc_updateSession() repeatedly as it was unavoidable hence we now creat the tables initially (using tlc_preserIndexSession()) and just fill them later in later calls of tlc_updateSession() repeatedly.
Now the bug is that, let’s just say a PD is published and tlc_updateSession() is called. The PD element gets inserted in the index table. However, now if the tlc_updateSession() gets called again, it again iterates through the complete PD send queue and distributes all the elements in the index table. The result of this is that same PD element which already exists, gets inserted in the table again, as the tables are not cleared (in case the size of existing tables is enough to accommodate all existing Pubs). Hence, effectively a PD with 1 sec cycle-time, on second call of tlc_updateSession() will be sent every 500 ms now!!! (Because now two entries exist) And so on….
We have attached a patched trdp_pdIndex.c in which now the tlc_updateSession() is now clearing all the tables first before distributing the PD elements again. I am not sure whether this is the best approach (brute-force: we clear all the tables fully everytime) or that we search whether same PD element already exists and don’t re-insert them.