-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pull] master from netdata:master #340
Conversation
* Store localhost information immediately * Fix return code on failure Use sqlite3_step_monitored * Remove get_node_list * Schedule node_state_update after 1 second Code cleanup * Code dedup aclk_create_node_instance_job to create a new node aclk_update_node_instance_job tp update node status aclk_send_node_instances uses in-memory hosts
Reviewer's Guide by SourceryThis pull request refactors the ACLK module to separate node instance creation and update logic into distinct functions, simplifying the process and improving code readability. It also removes unused code related to node instance management in the SQLite metadata module, consolidating metadata storage functions for efficiency. Additionally, it updates RRDHOST creation to store host info and metadata immediately if the host is local, and simplifies ACLK query handling by removing unnecessary parameters. Sequence diagram for updated node instance management flowsequenceDiagram
participant Host as RRDHOST
participant ACLK as ACLK Module
participant DB as SQLite DB
Host->>ACLK: aclk_host_state_update(host, live, queryable)
alt host is online
alt node_id is null
ACLK->>ACLK: aclk_create_node_instance_job(host)
Note over ACLK: Creates new node instance
else node_id exists
ACLK->>ACLK: aclk_update_node_instance_job(host, live, queryable)
Note over ACLK: Updates existing node instance
end
end
Class diagram for refactored node instance managementclassDiagram
class ACLK {
+aclk_host_state_update(host, live, queryable)
+aclk_create_node_instance_job(host)
+aclk_update_node_instance_job(host, live, queryable)
+aclk_send_node_instances()
}
class node_instance_creation_t {
+claim_id: string
+hops: int32
+hostname: string
+machine_guid: string
}
class node_instance_connection_t {
+claim_id: string
+hops: int32
+live: int
+queryable: int
+session_id: string
+node_id: string
+capabilities: string
}
ACLK ..> node_instance_creation_t
ACLK ..> node_instance_connection_t
Flow diagram for host metadata storage processflowchart TD
A[Start] --> B{Check Host Flags}
B -->|METADATA_LABELS| C[Store Host Labels]
B -->|METADATA_CLAIMID| D[Store Claim ID]
B -->|METADATA_INFO| E[Store Host and System Info]
C --> F[Clear METADATA_LABELS flag]
D --> G[Clear METADATA_CLAIMID flag]
E --> H[Clear METADATA_INFO flag]
F & G & H --> I[End]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.1)
Can you help keep this open source service alive? 💖 Please sponsor : )
Summary by Sourcery
Enhancements: