diff options
author | Markos Fountoulakis <44345837+mfundul@users.noreply.github.com> | 2019-05-15 08:28:06 +0300 |
---|---|---|
committer | Paul Emm. Katsoulakis <34388743+paulkatsoulakis@users.noreply.github.com> | 2019-05-15 08:28:06 +0300 |
commit | 6ca6d840dd19d5d7e9bacf93e011803ea5861496 (patch) | |
tree | f20393187806d642f94eab87f87180440089fb0a /configure.ac | |
parent | fed63b6e99dd70beb2cf9ccadd7c396aa05b2ae0 (diff) |
Database engine (#5282)
* Database engine prototype version 0
* Database engine initial integration with netdata POC
* Scalable database engine with file and memory management.
* Database engine integration with netdata
* Added MIN MAX definitions to fix alpine build of travis CI
* Bugfix for backends and new DB engine, remove useless rrdset_time2slot() calls and erroneous checks
* DB engine disk protocol correction
* Moved DB engine storage file location to /var/cache/netdata/{host}/dbengine
* Fix configure to require openSSL for DB engine
* Fix netdata daemon health not holding read lock when iterating chart dimensions
* Optimized query API for new DB engine and old netdata DB fallback code-path
* netdata database internal query API improvements and cleanup
* Bugfix for DB engine queries returning empty values
* Added netdata internal check for data queries for old and new DB
* Added statistics to DB engine and fixed memory corruption bug
* Added preliminary charts for DB engine statistics
* Changed DB engine ratio statistics to incremental
* Added netdata statistics charts for DB engine internal statistics
* Fix for netdata not compiling successfully when missing dbengine dependencies
* Added DB engine functional test to netdata unittest command parameter
* Implemented DB engine dataset generator based on example.random chart
* Fix build error in CI
* Support older versions of libuv1
* Fixes segmentation fault when using multiple DB engine instances concurrently
* Fix memory corruption bug
* Fixed createdataset advanced option not exiting
* Fix for DB engine not working on FreeBSD
* Support FreeBSD library paths of new dependencies
* Workaround for unsupported O_DIRECT in OS X
* Fix unittest crashing during cleanup
* Disable DB engine FS caching in Apple OS X since O_DIRECT is not available
* Fix segfault when unittest and DB engine dataset generator don't have permissions to create temporary host
* Modified DB engine dataset generator to create multiple files
* Toned down overzealous page cache prefetcher
* Reduce internal memory fragmentation for page-cache data pages
* Added documentation describing the DB engine
* Documentation bugfixes
* Fixed unit tests compilation errors since last rebase
* Added note to back-up the DB engine files in documentation
* Added codacy fix.
* Support old gcc versions for atomic counters in DB engine
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 93 |
1 files changed, 91 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 95b45dd42a..4e95858eda 100644 --- a/configure.ac +++ b/configure.ac @@ -131,6 +131,12 @@ AC_ARG_ENABLE( , [enable_lto="detect"] ) +AC_ARG_ENABLE( + [dbengine], + [AS_HELP_STRING([--disable-dbengine], [disable netdata dbengine @<:@default autodetect@:>@])], + , + [enable_dbengine="detect"] +) # ----------------------------------------------------------------------------- @@ -188,7 +194,7 @@ case "$host_os" in freebsd*) build_target=freebsd build_target_id=2 - CFLAGS="${CFLAGS} -I/usr/local/include" + CFLAGS="${CFLAGS} -I/usr/local/include -L/usr/local/lib" ;; darwin*) build_target=macos @@ -243,6 +249,46 @@ AC_MSG_RESULT([${with_math}]) # ----------------------------------------------------------------------------- +# libuv multi-platform support library with a focus on asynchronous I/O +# TODO: check version, uv_fs_scandir_next only available in version >= 1.0 + +AC_CHECK_LIB( + [uv], + [uv_fs_scandir_next], + [UV_LIBS="-luv"] +) + +OPTIONAL_UV_CLFAGS="${UV_CFLAGS}" +OPTIONAL_UV_LIBS="${UV_LIBS}" + + +# ----------------------------------------------------------------------------- +# lz4 Extremely Fast Compression algorithm + +AC_CHECK_LIB( + [lz4], + [LZ4_decompress_safe], + [LZ4_LIBS="-llz4"] +) + +OPTIONAL_LZ4_CLFAGS="${LZ4_CFLAGS}" +OPTIONAL_LZ4_LIBS="${LZ4_LIBS}" + + +# ----------------------------------------------------------------------------- +# Judy General purpose dynamic array + +AC_CHECK_LIB( + [Judy], + [JudyLIns], + [JUDY_LIBS="-lJudy"] +) + +OPTIONAL_JUDY_CLFAGS="${JUDY_CFLAGS}" +OPTIONAL_JUDY_LIBS="${JUDY_LIBS}" + + +# ----------------------------------------------------------------------------- # zlib PKG_CHECK_MODULES( @@ -280,6 +326,43 @@ OPTIONAL_UUID_LIBS="${UUID_LIBS}" # ----------------------------------------------------------------------------- +# OpenSSL Cryptography and SSL/TLS Toolkit + +AC_CHECK_LIB( + [crypto], + [SHA256_Init], + [SSL_LIBS="-lcrypto -lssl"] +) + +OPTIONAL_SSL_CLFAGS="${SSL_CFLAGS}" +OPTIONAL_SSL_LIBS="${SSL_LIBS}" + +# ----------------------------------------------------------------------------- +# DB engine +test "${enable_dbengine}" = "yes" -a -z "${UV_LIBS}" && \ + AC_MSG_ERROR([libuv required but not found. Try installing 'libuv1-dev' or 'libuv-devel'.]) + +test "${enable_dbengine}" = "yes" -a -z "${LZ4_LIBS}" && \ + AC_MSG_ERROR([liblz4 required but not found. Try installing 'liblz4-dev' or 'lz4-devel'.]) + +test "${enable_dbengine}" = "yes" -a -z "${JUDY_LIBS}" && \ + AC_MSG_ERROR([libJudy required but not found. Try installing 'libjudy-dev' or 'Judy-devel'.]) + +test "${enable_dbengine}" = "yes" -a -z "${SSL_LIBS}" && \ + AC_MSG_ERROR([OpenSSL required but not found. Try installing 'libssl-dev' or 'openssl-devel'.]) + +AC_MSG_CHECKING([if netdata dbengine should be used]) +if test "${enable_dbengine}" != "no" -a "${UV_LIBS}" -a "${LZ4_LIBS}" -a "${JUDY_LIBS}" -a "${SSL_LIBS}"; then + enable_dbengine="yes" + AC_DEFINE([ENABLE_DBENGINE], [1], [netdata dbengine usability]) +else + enable_dbengine="no" +fi +AC_MSG_RESULT([${enable_dbengine}]) +AM_CONDITIONAL([ENABLE_DBENGINE], [test "${enable_dbengine}" = "yes"]) + + +# ----------------------------------------------------------------------------- # compiler options AC_ARG_VAR([SSE_CANDIDATE], [C compiler flags for SSE]) @@ -781,7 +864,12 @@ CPPFLAGS="\ AC_SUBST([OPTIONAL_MATH_CFLAGS]) AC_SUBST([OPTIONAL_MATH_LIBS]) -AC_SUBST([OPTIONAL_NFACCT_CFLAGS]) +AC_SUBST([OPTIONAL_RT_CLFAGS]) +AC_SUBST([OPTIONAL_UV_LIBS]) +AC_SUBST([OPTIONAL_LZ4_LIBS]) +AC_SUBST([OPTIONAL_JUDY_LIBS]) +AC_SUBST([OPTIONAL_SSL_LIBS]) +AC_SUBST([OPTIONAL_NFACCT_CLFAGS]) AC_SUBST([OPTIONAL_NFACCT_LIBS]) AC_SUBST([OPTIONAL_ZLIB_CFLAGS]) AC_SUBST([OPTIONAL_ZLIB_LIBS]) @@ -831,6 +919,7 @@ AC_CONFIG_FILES([ collectors/xenstat.plugin/Makefile daemon/Makefile database/Makefile + database/engine/Makefile diagrams/Makefile health/Makefile health/notifications/Makefile |