-
Notifications
You must be signed in to change notification settings - Fork 28
Comparing changes
Open a pull request
base repository: alliedtelesis/apteryx
base: v5.32
head repository: alliedtelesis/apteryx
compare: master
Commits on Jan 24, 2024
-
Do not try and retrieve pid/ns for non UNIX sockets
This just generates uneeded syslog messages.
Configuration menu - View commit details
-
Copy full SHA for 2ddb56c - Browse repository at this point
Copy the full SHA 2ddb56cView commit details
Commits on Feb 7, 2024
-
Configuration menu - View commit details
-
Copy full SHA for f5ed3e0 - Browse repository at this point
Copy the full SHA f5ed3e0View commit details -
Add directory level refresher test
Ensure a directory level refresh is called when a get tree is done on that directory.
Configuration menu - View commit details
-
Copy full SHA for f6b1e0e - Browse repository at this point
Copy the full SHA f6b1e0eView commit details -
Add refresher path matching tests
Ensure refreshers are sent a path that matches the refreshed path. Some refreshers will used the passed in path to match against local copies, in this case the path must be terminated with a "/" if we don't otherwise have a key.
Configuration menu - View commit details
-
Copy full SHA for 2760fc6 - Browse repository at this point
Copy the full SHA 2760fc6View commit details -
Call directory level matches for refreshers
When processing a traverse we need to search for both the exact key and values further down the tree. Usually a direct single value will be fetched with apteryx_get, but it is legal (and done by some users) to call apteryx_get_tree for a single value.
Configuration menu - View commit details
-
Copy full SHA for 2762b8a - Browse repository at this point
Copy the full SHA 2762b8aView commit details -
Send / to refreshers who require it
When sending refresher callback message send a path that has a trailing '/' if the refresher is either a wildcard or directory level refresher, and this call was not for a specific value.
Configuration menu - View commit details
-
Copy full SHA for b285665 - Browse repository at this point
Copy the full SHA b285665View commit details -
Configuration menu - View commit details
-
Copy full SHA for ab898f8 - Browse repository at this point
Copy the full SHA ab898f8View commit details
Commits on Feb 8, 2024
-
Shutdown apteryx client library on lua_close
The apteryx client library is reference counted and so needs to be shutdown when the lua instance is closed.
Configuration menu - View commit details
-
Copy full SHA for a05d08a - Browse repository at this point
Copy the full SHA a05d08aView commit details
Commits on Feb 9, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 2c9b215 - Browse repository at this point
Copy the full SHA 2c9b215View commit details
Commits on Feb 18, 2024
-
Prepare more suitable paths to be passed to the refresher
We combine info from the refreshed path and the requested path. We now match both the current node and then node/ when looking for refreshers when doing a get tree. We no longer need the direct_request parameter to call_refreshers. Add more comprehensive unit tests for refresher paths.
Configuration menu - View commit details
-
Copy full SHA for 78bbcd1 - Browse repository at this point
Copy the full SHA 78bbcd1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 170a375 - Browse repository at this point
Copy the full SHA 170a375View commit details -
Configuration menu - View commit details
-
Copy full SHA for b482c5f - Browse repository at this point
Copy the full SHA b482c5fView commit details
Commits on Feb 19, 2024
-
Fix refreshing paths for wildcards
Do not call refresher if we have unresolved wildcards. Pass an actual wildcard node when recursing _refresh_paths so that strcmp matches properly. Fixup test asssertions for cases that should not have called a refresher and cases that were missing the final /. Add a bunch of test cases for root path queries and refreshers.
Configuration menu - View commit details
-
Copy full SHA for b4a45cb - Browse repository at this point
Copy the full SHA b4a45cbView commit details -
Call trunk wildcard refresher for first wildcard in query
This restores the previous behaviour and does not break the rule of a refresher not being passed a matching path. A refresher will be passed the longest path in a query that does not have a wildcard in it yet matches the refresher.
Configuration menu - View commit details
-
Copy full SHA for a6c8b1f - Browse repository at this point
Copy the full SHA a6c8b1fView commit details
Commits on Feb 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for faf9de1 - Browse repository at this point
Copy the full SHA faf9de1View commit details -
Tune lua garbage collector in alfred
The default values for the garbage collector in alfred can result in an ever-growing pile of garbage when repeated provide calls are made. Tune the garbage collector by reducing the pause value from the default 200 to 150 - the GC runs more frequently and prevents the pile from building up nearly as high. The lua_gc API differs between lua 5.3 and 5.4.
Configuration menu - View commit details
-
Copy full SHA for aec0a19 - Browse repository at this point
Copy the full SHA aec0a19View commit details
Commits on Mar 5, 2024
-
Fix local refresher for statistics
We should record the timestamp and last path on any local refreshers. We dont need to specify the CAS timestamp when adding stats to the DB, but using the wrong timestamp fn is even worse. Currently the only local refresher is for statistics and this fix avoids the stats refresher being thrashed.
Configuration menu - View commit details
-
Copy full SHA for 4353517 - Browse repository at this point
Copy the full SHA 4353517View commit details
Commits on Mar 11, 2024
-
Use MONOTONIC time for socket recv timeout
Get rid of the duplication of get_time_us functions.
Configuration menu - View commit details
-
Copy full SHA for 614dd9a - Browse repository at this point
Copy the full SHA 614dd9aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5198dea - Browse repository at this point
Copy the full SHA 5198deaView commit details
Commits on Mar 13, 2024
-
Ensure workers have correct sigmask
The slow work thread should have all signals blocked. But should call callbacks with the worker_sigmask. Tidy up variable naming so this is more obvious if this code is changed later.
Configuration menu - View commit details
-
Copy full SHA for 13ecc9f - Browse repository at this point
Copy the full SHA 13ecc9fView commit details
Commits on Apr 3, 2024
-
A worker pool is only needed for rpc instances that serve call backs
Since the glib-2.0 patch 4d2e77a55 GThreadPool: Always use the thread-spawning thread for the global shared thread pool GNOME/glib@4d2e77a creating a threadpool spawns a new thread. Previously, this was only the case for non-Linux platforms. This can cause issues for daemons that fork and depend on libraries that load apteryx on LT_INIT, as the glib threadpool spawned thread will not be copied on the fork. Additionally, now libraries that only use get calls will be running an extra thread from the threadpool. Move the threadpool creation into request_cb() to only spawn the pool managing thread for applications that require callbacks using workers.
Configuration menu - View commit details
-
Copy full SHA for 21bffd3 - Browse repository at this point
Copy the full SHA 21bffd3View commit details
Commits on Apr 15, 2024
-
Implement apteryx_watch_tree_masked
Allows users to create a watch callback that masks sets made by itself as defined by namespace and pid. Flags are now passed to apteryxd via the GUID. RPC messages contain the sender ns/pid. Use macros to alow users to activate the required functionality without them calling the _full fn.
Configuration menu - View commit details
-
Copy full SHA for 44de645 - Browse repository at this point
Copy the full SHA 44de645View commit details
Commits on Apr 16, 2024
-
Dont print error if apteryx_path_node passed NULL tree
It is commonly used to check if a tree has a path and that tree may be completely empty.
Configuration menu - View commit details
-
Copy full SHA for 8230c81 - Browse repository at this point
Copy the full SHA 8230c81View commit details
Commits on May 3, 2024
-
tests: don't try to sudo and set a value that doesn't exist
tcp_tw_recycle hasn't existed since 4.12, also it's a bit unfriendly to try to sudo
Configuration menu - View commit details
-
Copy full SHA for 1460d3d - Browse repository at this point
Copy the full SHA 1460d3dView commit details
Commits on Sep 17, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 309449d - Browse repository at this point
Copy the full SHA 309449dView commit details
Commits on Sep 20, 2024
-
Large set tree + watch performance
Add a new larger set tree with a watch. This is the target for upcoming tree callback matching.
Configuration menu - View commit details
-
Copy full SHA for 9d6e442 - Browse repository at this point
Copy the full SHA 9d6e442View commit details -
Add tree based callback matching
Add cb_match_tree. This function returns a GList of struct cb_tree_info with the usual cb_info_t structure populated, with a newly allocated GNode tree of the data that matches the callback.
Configuration menu - View commit details
-
Copy full SHA for 4a49013 - Browse repository at this point
Copy the full SHA 4a49013View commit details -
Use tree matching for watchers
The new config_match_tree function allows us to match the whole change set in a set tree or prune against all watchers and validators. These callbacks can then be called with the matching tree as a single RPC - this can save a lot of processing for large changesets.
Configuration menu - View commit details
-
Copy full SHA for e7c8e2b - Browse repository at this point
Copy the full SHA e7c8e2bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5d26b38 - Browse repository at this point
Copy the full SHA 5d26b38View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d9cde4 - Browse repository at this point
Copy the full SHA 1d9cde4View commit details -
Configuration menu - View commit details
-
Copy full SHA for a253464 - Browse repository at this point
Copy the full SHA a253464View commit details -
Handle error in parsing tree during handle_watch
Handle the unlikely case that the rpc_msg_decode_tree fails to build a tree.
Configuration menu - View commit details
-
Copy full SHA for 012c202 - Browse repository at this point
Copy the full SHA 012c202View commit details -
Ensure tree passed to watch tree callback are valid to be used in apt…
…eryx_set_tree apteryx_set_tree and apteryx_query both check that the root key in the tree is a valid apteryx path. It handle this ensure that the GNode that is created when parsing the tree has a "/" if it is not a longer path.
Configuration menu - View commit details
-
Copy full SHA for e974270 - Browse repository at this point
Copy the full SHA e974270View commit details
Commits on Sep 30, 2024
-
Add tests and assert for invalid tree structures
When Apteryxd is handling a tree it requires the non-root nodes to be single key values. Add tests where the client sends compound keys and an assert to stop the process.
Configuration menu - View commit details
-
Copy full SHA for 4693f00 - Browse repository at this point
Copy the full SHA 4693f00View commit details -
Break up compound non-root keys
Code in apteryxd is designed to handle GNode keys as single key values, so encode the tree in this way.
Configuration menu - View commit details
-
Copy full SHA for ac01dc0 - Browse repository at this point
Copy the full SHA ac01dc0View commit details
Commits on Oct 8, 2024
-
Return DB timestamp for refreshed paths
Previously we alway returned "now" if there was a chance of a path being refreshed. That was because refreshed paths always had their timestamps updated to "now" even if the refresher decided not to update anything so that we did not call the refresher again for stale child nodes. Now that we do not use the DB timestamps to decide whether to call the refreshers anymore we can fix this odd behaviour. The change in behaviour is; 1. A call to a refresher does not result in all children of the path having their timestamps set to "now" even if they were not modified. 2. A call to get a timestamp for a path will call refreshers to make sure the timestamp is up to date.
Configuration menu - View commit details
-
Copy full SHA for 63aea2b - Browse repository at this point
Copy the full SHA 63aea2bView commit details
Commits on Oct 14, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 3401d25 - Browse repository at this point
Copy the full SHA 3401d25View commit details -
Lock tree during cb_match_tree
The cb tree can be changed while iterating, so it needs to be locked.
Configuration menu - View commit details
-
Copy full SHA for 4cd230b - Browse repository at this point
Copy the full SHA 4cd230bView commit details
Commits on Oct 23, 2024
-
Add a function to remove duplicate values from a tree - as a side effect this will sort each level of the tree in alphabetic order.
Configuration menu - View commit details
-
Copy full SHA for f7ca50c - Browse repository at this point
Copy the full SHA f7ca50cView commit details -
apteryx_query result should not have duplicates
apteryx_query has an unusual behaviour in that some advanced queries can generate a tree with duplicate nodes. Remove these with apteryx_uniqify_tree.
Configuration menu - View commit details
-
Copy full SHA for 8d80098 - Browse repository at this point
Copy the full SHA 8d80098View commit details -
This allows the g_node_prepend done in _rpc_msg_decode_tree to reassemble the tree in the same order as it was originally without being O(n*n).
Configuration menu - View commit details
-
Copy full SHA for 690113b - Browse repository at this point
Copy the full SHA 690113bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 405a23f - Browse repository at this point
Copy the full SHA 405a23fView commit details -
Instated a check that now passes, made another test do what was intended.
Configuration menu - View commit details
-
Copy full SHA for 5e2c5e1 - Browse repository at this point
Copy the full SHA 5e2c5e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2d0a9c3 - Browse repository at this point
Copy the full SHA 2d0a9c3View commit details -
Check apteryx_set_tree with multiple values
Ensure a client setting up multiple values for the same key in a tree ends up with the last value actually being used. There are ways of doing this setup which will end up with the wrong value being set (requiring a mix of methods to create the tree), but this will work when APTERYX_VALUE / APTERYX_NODE is used the same way multiple times to create a tree with duplicate nodes.
Configuration menu - View commit details
-
Copy full SHA for 4aec22a - Browse repository at this point
Copy the full SHA 4aec22aView commit details
Commits on Nov 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 0808047 - Browse repository at this point
Copy the full SHA 0808047View commit details
Commits on Nov 28, 2024
-
Apteryxd can end up storing a lot of duplicated strings. This commit adds a cache to remove this duplication - it is called the same way strdup / free would be and will take care of allocating, reference counting and releasing strings. This cache has no locking, so needs to be called under an external lock. At the moment this used solely in code inside the db_lock in database.c
Configuration menu - View commit details
-
Copy full SHA for 7597a6e - Browse repository at this point
Copy the full SHA 7597a6eView commit details -
Update apteryx query assertions
When showing an incomplete nat rule router would crash, due to an invalid memory access. This was caused by having a validity check on an entity that does not exist resulting in an apteryx node with null data. This has been remedied by updating the assertion in the apteryx query func to return NULL when the node data is NULL. Preventing an invalid memory access when destroying the node.
Configuration menu - View commit details
-
Copy full SHA for 6294d3d - Browse repository at this point
Copy the full SHA 6294d3dView commit details
Commits on Nov 29, 2024
-
Update memuse for use of string-cache
Also use malloc_usable_size + malloc header of 8 bytes where we can.
Configuration menu - View commit details
-
Copy full SHA for 2441d3b - Browse repository at this point
Copy the full SHA 2441d3bView commit details
Commits on Dec 10, 2024
-
Fix thread contention in string-cache
Both database.c and callback.c use the hashtree code, so the cache needs to be protected with a lock.
Configuration menu - View commit details
-
Copy full SHA for 86ffbe2 - Browse repository at this point
Copy the full SHA 86ffbe2View commit details
There are no files selected for viewing