t/valgrind.suppress: Updated existing suppression for newer check version.
(Keeping the old around for people using the old version of check, e.g.
Travis.)
(Keeping the old around for people using the old version of check, e.g.
Travis.)
t/: Include testwrapper.sh in the distribution tarball.
t/valgrind.suppress: Suppress another error in check.
t/cibuild.sh: Still use TESTS_ENVIRONMENT="./testwrapper.sh".
LOG_COMPILER is not supported by older automake versions.
LOG_COMPILER is not supported by older automake versions.
t/: Always use testwrapper.sh for running tests.
… using automake's LOG_COMPILER variable.
… using automake's LOG_COMPILER variable.
data_test: Fixed access to uninitialized memory.
avltree: Iterate through the tree depth-first when clearing it.
Else, we cannot simple delete each node but we'd have to actually remove it
from the tree because we'd be removing non-leaf nodes.
Don't use recursion for iterating the tree. It's not needed and would
consume stack-space unnecessarily. The current approach limits the size of the
tree by heap memory only.
Else, we cannot simple delete each node but we'd have to actually remove it
from the tree because we'd be removing non-leaf nodes.
Don't use recursion for iterating the tree. It's not needed and would
consume stack-space unnecessarily. The current approach limits the size of the
tree by heap memory only.
store: Use AVL trees to store all objects.
avltree: Always compare objects by name.
We don't need a custom compare function (for now) and correctly passing in a
const string when comparing based on objects is annoying to get right.
We don't need a custom compare function (for now) and correctly passing in a
const string when comparing based on objects is annoying to get right.
avltree: Added documentation for all functions.
avltree: Added sdb_avltree_lookup().
object: Added SDB_OBJECT_STATIC.
This is a helper to initialize static, named objects.
Replaced SSTRING_OBJ (which was basically the same) used by unit tests.
This is a helper to initialize static, named objects.
Replaced SSTRING_OBJ (which was basically the same) used by unit tests.
object: Static wrapper objects cannot have a destructor.
We cannot free the static memory and, thus, cannot destroy the object.
We cannot free the static memory and, thus, cannot destroy the object.
avltree.h: Removed obsolete TODO note.
AVL trees *are* balanced now :-)
AVL trees *are* balanced now :-)
avltree: Added helper function sdb_avltree_valid().
The function walks the entire tree and checks each node for problems (e.g.
unbalanced nodes, wrong height, missing child/parent links).
Use the function in the unit tests (which is the primary use for the function
anyway ;-)).
The function walks the entire tree and checks each node for problems (e.g.
unbalanced nodes, wrong height, missing child/parent links).
Use the function in the unit tests (which is the primary use for the function
anyway ;-)).
error.h: Removed long-unused constant.
avltree: Don't leak memory when clearing the tree.
Remove all nodes starting at the smallest instead of at the root.
Remove all nodes starting at the smallest instead of at the root.
avltree: Added helper to determine smallest node.
avltree: Lock the tree during insertion.
avltree: Rebalance the tree after inserting a new element.
avltree_test: Degenerate (unbalanced) test-tree even more.
avltree: Removed some irrelevant special cases.
sysdb.h: Added helpers to compare two values.
coverage.sh: Ignore *.y / *.l files.
lcov cannot handle them correctly.
lcov cannot handle them correctly.
avltree_test: Test duplicate detection and clear() as well.
utils avltree: Started implementation of an AVL tree.
So far, it's just an unbalanced binary tree, though ;-)
So far, it's just an unbalanced binary tree, though ;-)
Moved compare and lookup callback types from utils/llist to core/object.
Makefile: Install utils/os.h as well.
collectd::unixsock backend: Store plugin identifier as service attributes.
collectd::unixsock backend: Added support for spaces in identifiers.
Don't treat space as a field separator for LISTVAL responses. Instead, split
of the update timestamp from the hostname after splitting at slash characters
only.
Don't treat space as a field separator for LISTVAL responses. Instead, split
of the update timestamp from the hostname after splitting at slash characters
only.
store: Reduce logging about "old" values.
Don't log, if the same timestamp was used to submit the value. This avoids
excessive noise in the logs on high sampling rates.
Don't log, if the same timestamp was used to submit the value. This avoids
excessive noise in the logs on high sampling rates.
unixsock, data: Moved sdb_unixsock_parse_cell() to sdb_data_parse().
The function parses a string into a datum. For date-time values, floating
point seconds since the epoch are supported only.
Added unit tests.
The function parses a string into a datum. For date-time values, floating
point seconds since the epoch are supported only.
Added unit tests.
store: Include service attributes in JSON output.
store: Don't update unchanged attribute values.
When handling dynamically allocated data, this would generate unnecessary
memory churn.
When handling dynamically allocated data, this would generate unnecessary
memory churn.
data: Pass const pointers to sdb_data_cmp().
store: Don't overwrite attribute values if the new timestamp is too old.
Also, extended the unit tests to catch this error.
Also, extended the unit tests to catch this error.
store: Introduced service attributes.
store: Consider objects too old if the new timestamp matches the old.
In theory, this doesn't make a big difference as either approach will let the
result depend on the order of update operations. However, considering more
cases as too old will allow to ignore more stuff and, thus, avoid some work.
In theory, this doesn't make a big difference as either approach will let the
result depend on the order of update operations. However, considering more
cases as too old will allow to ignore more stuff and, thus, avoid some work.
data: Improved memory handling in data_copy().
Ensure that dynamic memory in the destination is freed before copying the new
data. That'll avoid that the caller has to use data_free_datum() first and
destroy previous data even if the copy fails.
Ensure that dynamic memory in the destination is freed before copying the new
data. That'll avoid that the caller has to use data_free_datum() first and
destroy previous data even if the copy fails.
store: Don't destroy an attribute if data_copy() failed.
Else, the store would reference invalid memory.
Else, the store would reference invalid memory.
store: Split internal store_obj() function into multiple functions.
This avoids a couple of unnecessary checks and will allow to reuse some parts.
This avoids a couple of unnecessary checks and will allow to reuse some parts.
version-gen.sh: Added .git suffix to default version again.
Release SysDB 0.2.0.
sysdbql(7): Documented conditional attribute matchers.
ReleaseNotes: Added release 0.2.0.
Merged branch 'master' of git://git.tokkee.org/sysdb.
store: Include backend information in the JSON serialization.
store: Store the backend of each stored object.
The backends are stored as a list of the plugin names of the plugins providing
the respective object.
The backends are stored as a list of the plugin names of the plugins providing
the respective object.
plugin: Added sdb_plugin_current().
This function returns the plugin information for the plugin from which the
current call into the core originated.
This function returns the plugin information for the plugin from which the
current call into the core originated.
plugin: Make sdb_plugin_info_t public.
store: Split out common JSON code into a separate helper function.
Travis: Ignore .y/.l files when running cpp-coveralls.
os_test: Added tests for os_mkdir_all() and os_remove_all().
utils os: Added sdb_remove_all() to recursively remove a path.
connection_test: Use mkstemp() instead of tmpnam().
sock_test: Use mkstemp() instead of tmpnam().
Don't free dirname()'s return value.
It may point to static memory.
It may point to static memory.
utils os: Don't enforce the mode on existing directories in mkdir_all().
This behaves badly when trying to create base directories like /var/run/ ;-)
This behaves badly when trying to create base directories like /var/run/ ;-)
frontend: Ensure that the base directory of a UNIX socket exists.
utils os: Added sdb_mkdir_all() helper function.
This function recursively creates a directory (similar to 'mkdir -p' on the
command line).
This function recursively creates a directory (similar to 'mkdir -p' on the
command line).
syslog plugin: Don't log DEBUG messages for now.
syslog plugin: Initialize syslog as soon as possible.
Don't wait for the init callback to be called -- we might receive log messages
earlier than that.
Don't wait for the init callback to be called -- we might receive log messages
earlier than that.
Merged branch 'master' of git://git.tokkee.org/sysdb.
build system: Added --enable-gprof configure flag.
plugin: Use multiple log entries when logging plugin information.
… instead of using a multi-line log entry (which is ugly).
… instead of using a multi-line log entry (which is ugly).
plugin: The replaced SDB_PLUGIN_INFO_NAME with the actual plugin name.
There's no need for any duplication.
There's no need for any duplication.
plugin: Automatically prepend callback names with the plugin name.
core: Automatically determine config callback names.
The plugin name (as stored in the plugin context) is used for that purpose,
thus, ensuring that Plugin/Backend blocks will always belong to the respective
LoadPlugin/LoadBackend options of the same name.
The plugin name (as stored in the plugin context) is used for that purpose,
thus, ensuring that Plugin/Backend blocks will always belong to the respective
LoadPlugin/LoadBackend options of the same name.
store: Cleaned up variable name (obj_lock → host_lock).
store_lookup: Use more specific types where appropriate.
store: Renamed store_base to store_obj.
store: Split store_obj into separate host and service objects.
Merged branch 'master' of git://git.tokkee.org/sysdb.
store: Simplified object lookup during update.
Again, based on having hosts on the toplevel only. This greatly simplifies the
overall structure. After all, this is the underlying storage layer only. More
complex relationships between objects will be handled on a different layer.
Again, based on having hosts on the toplevel only. This greatly simplifies the
overall structure. After all, this is the underlying storage layer only. More
complex relationships between objects will be handled on a different layer.
store: Simplified object update based on having hosts on the toplevel only.
store: Renamed a store object's 'children' to 'services'.
Hierarchical data will be represented using some object relationship
information rather than a weird tree construct below each host. That's going
to be more flexible.
Hierarchical data will be represented using some object relationship
information rather than a weird tree construct below each host. That's going
to be more flexible.
store: Removed obsolete TODO note.
plugin: Ignore internal loggers when checking for existing loggers.
An internal logger may currently be registered by the frontend which uses it
to send log messages to a client. Usually, these internal loggers will not
actually log stuff. Thus, we'll have to ignore them when deciding about
fallbacks.
An internal logger may currently be registered by the frontend which uses it
to send log messages to a client. Usually, these internal loggers will not
actually log stuff. Thus, we'll have to ignore them when deciding about
fallbacks.
sysdb: Wait for remaining data after the mainloop terminates.
client: Added sdb_client_shutdown().
Makefile: For now, link libsysdb sources directly into sysdbd.
Libtool's convenience libraries don't work with programs. When linking sysdbd
previously, none of the libsysdb objects only used by plugins would have been
linked in. That is, the respective libraries could not be loaded when running
the daemon.
We'll keep the library around, though, since it's used for the unit tests.
This is just a hack but it'll go away after the API is stable and libsysdb is
turned back into a "real" library. That'll happen before the 1.0 release.
Libtool's convenience libraries don't work with programs. When linking sysdbd
previously, none of the libsysdb objects only used by plugins would have been
linked in. That is, the respective libraries could not be loaded when running
the daemon.
We'll keep the library around, though, since it's used for the unit tests.
This is just a hack but it'll go away after the API is stable and libsysdb is
turned back into a "real" library. That'll happen before the 1.0 release.
t/: Make mock_plugin a "check" library.
This way, it's only built on 'make check' (aka 'make test').
This way, it's only built on 'make check' (aka 'make test').
store/frontend: Added support for integer and float comparison.
This is supported only for comparing attribute values.
This is supported only for comparing attribute values.
frontend: Added initial parser for "data" values.
Merged branch 'master' of git://git.tokkee.org/sysdb.
store_lookup: Pass a data-object to parse_cmp().
That'll allow for comparing attribute values of any type.
That'll allow for comparing attribute values of any type.
store_lookup: Added support for <, <=, >=, > when comparing attribute values.
store_lookup: Don't accept invalid object types in parse_cmp().
Added a unit-test catching that.
Added a unit-test catching that.
store_lookup_test: Fixed a memory leak.
Thanks to Travis-CI for identifying this! I wonder why my local tests did not
catch this :-(
Thanks to Travis-CI for identifying this! I wonder why my local tests did not
catch this :-(
store_lookup: Introduce conditional based attribute matchers.
This allows using less-than, less-equal, equal, greater-equal, greater-than
operators on attributes.
This allows using less-than, less-equal, equal, greater-equal, greater-than
operators on attributes.
data: Pass 'const' data objects to strlen()/format().
store: Added helper function to retrieve a host's attribute.
This also fixes a memory leak in case of an data_format() error.
This also fixes a memory leak in case of an data_format() error.
store_lookup_test: Verify that NULL is not a valid attribute name.
store: Don't allow name to be NULL when matching attributes.
There's no real use-case for it imho and it's just a weird special case in the
code.
There's no real use-case for it imho and it's just a weird special case in the
code.
store_lookup: Simplified some internal checks.
store: Removed a obsolete (and now somewhat misleading) comment.
store_lookup: Removed unneeded forward declarations.
Also, reshuffled some functions a bit to have a more natural order now that
the matcher approach is greatly simplified.
Also, reshuffled some functions a bit to have a more natural order now that
the matcher approach is greatly simplified.
Cleaned up some internal type names.
store_lookup: Removed the (now unused) host matcher.
store_lookup: Let attribute matchers check the attribute name.