Skip to content

Improve datafile rotation and indexing #20354

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

Merged
merged 11 commits into from
May 29, 2025
Merged

Conversation

stelfrag
Copy link
Collaborator

@stelfrag stelfrag commented May 27, 2025

Summary
  • Reduce number of scheduled jobs, check if opcodes already pending
  • Pause indexing if quota is exceeded and allow db rotation to run
    • Allow indexing to process at least one file
  • Add datafile locking and allow indexing to run alongside with datafile rotation again

stelfrag added 5 commits May 28, 2025 18:51
Report full name of the journal file to be indexed
Improve disk space reclaim log with human-readable format
Additional use of UNLINK_FILE macro
Update logging to include journal file paths
@stelfrag stelfrag marked this pull request as ready for review May 29, 2025 09:50
Copy link
Contributor

@thiagoftsm thiagoftsm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran netdata inside gdb and not issue was found. LGTM!

@stelfrag stelfrag merged commit 4812fe1 into netdata:master May 29, 2025
107 of 108 checks passed
@stelfrag stelfrag deleted the db_indexing branch May 29, 2025 15:04
stelfrag added a commit to stelfrag/netdata that referenced this pull request Jun 3, 2025
* Check tier quota after indexing each file
Do not schedule a db rotate command if quota is ok

* Cleanup journalfile deletion code
Log a warning if journalfile cannot be unmapped

* Schedule database rotation / journal indexing in callbacks
Indicate if rotation is due to disk quota or time retention
Reduce number of opcodes

* Change log level for journal indexing messages from DEBUG to INFO

* Report acquired file for deletion

* Allow indexing during rotation

* Allow rotation during indexing

* Allow the indexing to run at least once

* Fix compilation warning
Report full name of the journal file to be indexed
Improve disk space reclaim log with human-readable format

* Adjust formatting for file logging
Additional use of UNLINK_FILE macro
Update logging to include journal file paths

* More formatting adjustments for file logging

(cherry picked from commit 4812fe1)
@stelfrag stelfrag mentioned this pull request Jun 3, 2025
Ferroin pushed a commit that referenced this pull request Jun 5, 2025
* Check tier quota after indexing each file
Do not schedule a db rotate command if quota is ok

* Cleanup journalfile deletion code
Log a warning if journalfile cannot be unmapped

* Schedule database rotation / journal indexing in callbacks
Indicate if rotation is due to disk quota or time retention
Reduce number of opcodes

* Change log level for journal indexing messages from DEBUG to INFO

* Report acquired file for deletion

* Allow indexing during rotation

* Allow rotation during indexing

* Allow the indexing to run at least once

* Fix compilation warning
Report full name of the journal file to be indexed
Improve disk space reclaim log with human-readable format

* Adjust formatting for file logging
Additional use of UNLINK_FILE macro
Update logging to include journal file paths

* More formatting adjustments for file logging

(cherry picked from commit 4812fe1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants