diff options
author | Costa Tsaousis <costa@netdata.cloud> | 2022-06-01 20:01:52 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-01 20:01:52 +0300 |
commit | 7784a16cc7af8260bb8877873a60d7dc6d2c9e73 (patch) | |
tree | 28964e18f97bfee01977240981fb53333f95bc7e /registry/registry_internals.c | |
parent | c261a771cc0c93fe4e9fbb83e1be141406d314be (diff) |
Dictionary with JudyHS and double linked list (#13032)
* dictionary internals isolation
* more dictionary cleanups
* added unit test
* we should use DICT internally
* disable cups in cmake
* implement DICTIONARY with Judy arrays
* operational JUDY implementation
* JUDY cleanup
* JUDY summary added
* JudyHS implementation with double linked list
* test negative searches too
* optimize destruction
* optimize set to insert first without lookup
* updated stats
* code cleanup; better organization; updated info
* more code cleanup and commenting
* more cleanup, renames and comments
* fix rename
* more cleanups
* use Judy.h from system paths
* added foreach traversal; added flag to add item in front; isolated locks to their own functions; destruction returns the number of bytes freed
* more comments; flags are now 16-bit
* completed unittesting
* addressed comments and added reference counters maintainance
* added unittest in main; tested removal of items in front, back and middle
* added read/write walkthrough and foreach; allowed walkthrough and foreach in write mode to delete the current element (used by cups.plugin); referenced counters removed from the API
* DICTFE.name should be const too
* added API calls for exposing all statistics
* dictionary flags as enum and reference counters as atomic operations
* more comments; improved error handling at unit tests
* added functions to allow unsafe access while traversing the dictionary with locks in place
* check for libcups in cmake
* added delete callback; implemented statsd with this dictionary
* added missing dfe_done()
* added alternative implementation with AVL
* added documentation
* added comments and warning about AVL
* dictionary walktrhough on new code
* simplified foreach; updated docs
* updated docs
* AVL is much faster without hashes
* AVL should follow DBENGINE
Diffstat (limited to 'registry/registry_internals.c')
-rw-r--r-- | registry/registry_internals.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/registry/registry_internals.c b/registry/registry_internals.c index cffe3f21d7..fe4d2dac55 100644 --- a/registry/registry_internals.c +++ b/registry/registry_internals.c @@ -198,7 +198,7 @@ REGISTRY_PERSON *registry_request_delete(char *person_guid, char *machine_guid, } -// a structure to pass to the dictionary_get_all() callback handler +// a structure to pass to the dictionary_walkthrough_read() callback handler struct machine_request_callback_data { REGISTRY_MACHINE *find_this_machine; REGISTRY_PERSON_URL *result; @@ -246,7 +246,7 @@ REGISTRY_MACHINE *registry_request_machine(char *person_guid, char *machine_guid // We will walk through the PERSON_URLs to find the machine // linking to our machine - // a structure to pass to the dictionary_get_all() callback handler + // a structure to pass to the dictionary_walkthrough_read() callback handler struct machine_request_callback_data rdata = { m, NULL }; // request a walk through on the dictionary |