0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-05-20 07:49:53 +00:00
Commit graph

13 commits

Author SHA1 Message Date
Emmanuel Vasilakis
bf023b50fe
Try to find worker thread from parked ones () 2022-01-11 15:42:24 +02:00
Stelios Fragkakis
0586829ee6
Add commands to check and fix database corruption ()
* Set a flag to do aclk sync thread shutdown
Attempt to dequeue a cmd in case the queue is full and someone is blocked

* Drop tables and recreate instead of deleting

* Add commands to check the database -W check-database, fix-database, compact-database

* Split the database setup to config and cleanup part

* Add checks during database setup and cleanup to detect corruption to the dimension and chart tables

* Add full database check and refactor code

* Change commands to better indicate that the operations refer to the sqlite metadata database (not the metrics dbengine database)

* Add check for table being null (request for entire database check)

* Rename command for better clarity
2021-11-26 20:36:00 +02:00
Emmanuel Vasilakis
14507c9597
Always queue alerts to aclk_alert ()
* always queue to aclk_alert

* proper function name
2021-11-18 20:14:31 +02:00
Emmanuel Vasilakis
5471894ac2
Delete from aclk alerts table if ack'ed from cloud one day ago () 2021-11-17 09:19:05 +02:00
Emmanuel Vasilakis
9676eff1bc
insert into aclk_alert instead of queuing () 2021-11-11 15:06:04 +02:00
Stelios Fragkakis
e9efad18e8
Improve the ACLK sync process for the new cloud architecture ()
* 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
2021-11-03 19:18:35 +02:00
Emmanuel Vasilakis
eefa40cb54
Queue removed alerts to cloud for new architecture ()
* rebased

* add error message

* make function void

* fix return
2021-10-25 16:39:24 +03:00
Emmanuel Vasilakis
0882ed03b4
Add snapshot message and calls to sql_queue_removed_alerts_to_aclk () 2021-10-19 11:30:10 +03:00
Stelios Fragkakis
12f16063f5
Enable additional functionality for the new cloud architecture () 2021-10-06 20:55:31 +03:00
Emmanuel Vasilakis
4ae3199311
Add alert message support for ACLK new architecture ()
* add alert messages

* also clear date_cloud_ack

* move buffer_create

* remove include file

* use wc->node_id
2021-09-23 17:34:34 +03:00
Stelios Fragkakis
dbbb553459
Address coverity report issues CID_373247-373251 ()
* Fix memory leak CID_373251

* Check return value CID_373248

* Check return code CID_373249

* Check return code CID_373250

* Initialize cmd CID_373249
2021-09-22 12:57:59 +03:00
Stelios Fragkakis
2085a518c3
Add chart message support for ACLK new architecture () 2021-09-21 22:37:12 +03:00
Stelios Fragkakis
6f3b2d8a2a
Add ACLK synchronization event loop () 2021-08-11 17:13:32 +03:00