forked from netdata/netdata
-
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 #325
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Add worker for alert queue processing * Add a worker job to monitor wait for execution Make sure to worker_idle() after every host processing
* Add workers Do not delete labels when removing a node Complete one scan for chart and dimension metadata check * Fix logs, formatting * Remove unused function * Code cleanup * Fixed missing prepared statement check * Do checks for vacuum at most every 60 seconds
Co-authored-by: ilyam8 <[email protected]>
Reviewer's Guide by SourceryThis pull request focuses on improving the metadata cleanup process by introducing several changes to how metadata is stored and deleted. It also includes changes to the database vacuuming process and the way labels are handled. Sequence diagram for improved metadata cleanup processsequenceDiagram
participant Host
participant MetadataWorker
participant SQLite
Host->>MetadataWorker: Queue metadata update
activate MetadataWorker
MetadataWorker->>MetadataWorker: Begin transaction
MetadataWorker->>SQLite: Store host metadata
MetadataWorker->>SQLite: Store chart metadata
MetadataWorker->>SQLite: Store dimension metadata
MetadataWorker->>MetadataWorker: Commit transaction
MetadataWorker->>MetadataWorker: Run cleanup loop
MetadataWorker->>SQLite: Vacuum database if needed
deactivate MetadataWorker
Class diagram for metadata storage changesclassDiagram
class MetadataWorker {
-wc: metadata_wc*
-work_buffer: BUFFER*
-pending_ae_list: judy_list_t*
-pending_ctx_cleanup_list: judy_list_t*
-pending_uuid_deletion: judy_list_t*
+store_metadata()
+run_cleanup_loop()
+vacuum_database()
}
class SQLiteMetadata {
+store_chart_metadata()
+store_dimension_metadata()
+store_host_systeminfo()
+check_dimension_metadata()
+check_chart_metadata()
+check_label_metadata()
}
MetadataWorker --> SQLiteMetadata: uses
State diagram for metadata cleanup processstateDiagram-v2
[*] --> Idle
Idle --> ProcessingMetadata: Metadata update queued
ProcessingMetadata --> StoringData: Begin transaction
StoringData --> RunningCleanup: Commit transaction
RunningCleanup --> VacuumingDB: Cleanup completed
VacuumingDB --> Idle: Vacuum completed
note right of ProcessingMetadata: Improved batch processing
note right of RunningCleanup: Removed MAX_METADATA_CLEANUP limit
note right of VacuumingDB: New vacuum frequency control
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Improve the metadata cleanup process and update documentation with new examples.
New Features:
Enhancements:
Tests: