- Variable "hostname" going out of scope leaks the storage it points to.
- Null-checking "rd->name" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
* Try to queue dimension always when:
Trying to clean obsolete charts
If chart has been sent and liveness apparently changed
* delay rotation and skip chart check if not send to cloud
* No need to CLEAR flag during database rotation
Do not clear chart ACLK status for dimension requests
* Change payload_sent to return timestamp of submitted message
* Clear the dimension ACLK flag if we are processing all the charts again
* Check if dimension is already queued to ACLK and ignore it
If queue fails then reset it to retry
Already try to queue the dimension
* Improve dimension cleanup during the retention message calculation
* Change queue_dimension_to_aclk to return void
* If no time range for this dimension then assume it is deleted
* Start streaming for inactive nodes
* Remove dead code
* Correctly report hostname in the access log
* Schedule a dimension deletion without trying to submit a message immediately
* Enable dimension cleanup -- also delete dimension if not found in the dbengine files
Free hostname
* Add function to check a specific chart
* If a chart is not obsoleted, check if the liveness needs to be updated
* Calculate liveness based on a (constant * update_every) for each dimension
* Scan all dimensions when the retention message is constructed and update liveness if needed
* If initial state, set to computed live
* Set computed live state to dimension
* Add a maximum dimension cleanup on startup to prevent message flood
* Schedule chart updates if charts streaming is enabled
* Adjust live state for dimension
* The query executed will have a valid dimension uuid only if memory mode is dbengine
* Switch messages to ACLK RES, ACLK REQ, ACLK STA instead of OG, IN and just AC
* Lookup hostname by node id
* Record hostname when receiving an ACK for a chart sequence
* Additional log_access info
* Adjust log message when receing health log request
* Remove redundant ACK log message
* Remove duplicate log message
* Remove duplicate sql statements
* Rearrange variable definition for clarity
* Make sure node is a valid UUID (check return code)
* Switch to prepare statement when storing active charts / dimensions
* Switch to prepare statement when storing chart labels
* Switch to prepare statement when doing a node id lookup
* Switch to prepare statement when loading the node id for a host
* Improve performance by avoiding db query
* Use prepare statement when counting pending chart messages to send to the cloud
* Delay locking while preparing commands
* No need to use buffer, avoid memory allocation overhead
* Switch to prepare statement when loading pending chart updates to send to the cloud
* Queue a chart immediately to the cloud
* Do not inform the cloud immediately if a dimension stopped collecting use MAX(obsoletion time, 1.5 * update_every)
* Notify cloud immediately on dimension deletion
* Add debug messages
* Do not schedule an update if we are shutting down
* add some logging for ng arch to access.log
* change arrows to IN, OG, AC
* log also the params for aclk requests
* check for wc->host before using wc->host->hostname
* turn two messages to info
* reduce alert event logs
* used thread local variables
* Enhance the dimension delete table and adjust the trigger to include chart_id and host_id
* Add the aclk_process_dimension_deletion function
* Change variable chart_name in aclk_upd_dimension_event (it is st->id from st.type dot st.id)
* Process dimension deletion when retention updates are sent
* Do not send charts if we don't have dimensions
* Add check for uuid_parse return code
* Move retention code to the charts
* Log information about node registration and updates
* Prevent deadlock if aclk_database_enq_cmd locks for a node
* Improve message (indicate that it comes from alerts). This will be improved in a followup PR
* Disable parts that can't be used if the new cloud env is not available
* Set dimension FLAG if message has been queued
* Queue messages using the correct protocol enabled
* Cleanup unused functions
Rename functions that queue charts and dimensions
Improve the generic chart payload add function
Add a counter for pending charts/dimension payloads to avoid polling the db
Delay the retention update message until we are done with the updates
Fix full resync command to handle sequence_id = 0 correctly
Disable functions not needed when the new cloud env functionality is not compiled
* Add chart_payload count and retry count
Output information or error message if we fail to queue chart/dimension PUSH commands
Only try to queue commands if we have chart_payload_count>0
Remove the event loop shutdown opcode handle
* Improve detection of shutdown (check netdata_exit)
* Adjusting info messages
ACLK-NG supports both new and old cloud protocol. Protobuf and C++ compiler are required only for new cloud protocol.
There is no reason to skip building whole ACLK-NG when protobuf is missing.