From Fedora Project Wiki
 
Line 14: Line 14:
3) Keep the cache always consistent with the local changes. Include external changes then. Filter out
3) Keep the cache always consistent with the local changes. Include external changes then. Filter out
inconsistent messages.
inconsistent messages.
Solution #3 looks like the way to go. The filtering part may be tedious.

Latest revision as of 11:44, 4 December 2012

Netlink

There are two netlink sockets in use. One for synchronous commands sent to the kernel, the other for asynchronous events from outside. The latter is being used to keep caches up-to-date, so they can be used for various information requests including forward and reverse interface name resolution.

The discrepencies between those two can cause problems such as not updating the cache in time when sending requests to the kernel. The solutions are:

1) Keep the cache always consistent with the kernel status. That breaks the purpose of the cache, as it must be updated before any read operation. This is the current behavior.

2) Keep the cache always consistent with the kernel messages. That makes e.g. set-and-get tests fail, making the API effectively asynchronous.

3) Keep the cache always consistent with the local changes. Include external changes then. Filter out inconsistent messages.

Solution #3 looks like the way to go. The filtering part may be tedious.