On Thu, Sep 12, 2024 at 01:28:16PM +0200, Antonio Quartulli wrote:
I feel you need to answer the above questions even with two tables. No? The difference is that with two tables you have more information and don't need overwrite a DHT entry with a local one (and viceversa).
Right. Though the straight-forward/easy approach differs between the two, I guess:
Currently with the two table approach I'm not having any direct interaction between them. So in theory a node might have a DHT table entry which is not as up-to-date as a DAT local cache entry on the same node?
But I'm having a hard time constructing this scenario. I guess it would need some topology change that results in new/other DAT candidate nodes? But then that entry wouldn't be that relevant anymore anyway, if it's not on a DAT candidate anymore?
While the straight-forward / less lines of codes approach with flags would be to always overwrite and flip the flag, I guess.
I think splitting is a good idea, not only because of the timeout, but also because it makes the state more clear.
Right, and you can also see the two, distinct states clearly as a user with the new "batctl dd" vs. "batctl dc".
Regards, Linus