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 #349
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 agent_version to the challegne response
* fix incomplete implementation for journal watcher * debug messages logged as info to verify operation * detect symlinks to directories * added error handling to all inotify calls * fix for amazon linux not supporting IN_MASK_CREATE * fix cleanup when removing directories and symlinks to directories
…rdinality (#19594) Add check for instances_active > 0 (coverity warning div by 0)
* Cleanup request * Safe release of wal after ctx_current_disk_space_increase and ctx_io_write_op_bytes
Reviewer's Guide by SourceryThis pull request enhances the systemd journal watcher by adding better event logging with inotify event masks, symlink resolution, and improved error handling. Additional improvements include refactoring of resource cleanup and minor adjustments in journal file and dictionary handling, as well as updates to the data engine and OTP payload. Sequence Diagram for Processing Inotify Events in Journal WatchersequenceDiagram
participant Inotify as Inotify
participant JW as JournalWatcher
participant Logger as Logger
participant Resolver as SymlinkResolver
Inotify->>JW: Receive inotify_event
JW->>JW: errno_clear()
JW->>JW: get_path_from_wd(watcher, event.wd)
alt Watch descriptor not found
JW->>Logger: Log missing watch descriptor
JW-->>Inotify: Return (ignore event)
else
JW->>Logger: Log event details with event.mask
alt Event is IN_CREATE or IN_MOVED_TO
JW->>JW: sleep 1ms (stabilize symlink)
JW->>Resolver: realpath(fullPath)
Resolver-->>JW: Return resolved_path
JW->>Logger: Log new/updated symlinked directory
JW->>JW: (if directory) call watch_directory_and_subdirectories()
else if Directory deletion/move event
JW->>Logger: Log directory delete/move event
JW->>JW: remove_directory_watch(watcher, inotifyFd, path_to_use)
else if Journal file event
JW->>JW: dictionary_set(watcher->pending, path_to_use, NULL, 0)
else
JW->>Logger: Log ignored event
end
end
Updated Class Diagram for Watcher StructuresclassDiagram
class Watcher {
+WatchEntry *watchList
+int watchCount
+int watchListSize
+DICTIONARY *pending
+SYMLINKED_DIRS_JudyLSet symlinkedDirs
+size_t errors
}
class WatchEntry {
+int wd
+char *path
+int slot
}
Watcher --> WatchEntry : contains
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
Update the systemd journal watcher to handle symlinked directories, add agent version to OTP responses, fix a memory leak in the dictionary implementation, and improve database archiving logic. Also, fix a bug in extent writing and update disk space calculations.
New Features:
Bug Fixes:
Enhancements: