bugfix: scope partition maintenance to target table and lock create path#271
Merged
TheWitness merged 1 commit intoCacti:developfrom Mar 16, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes syslog partition maintenance so it correctly targets the requested table (e.g., syslog_removed), adds a guardrail for which tables are eligible for partition operations, and serializes partition creation to avoid concurrent “duplicate partition” errors.
Changes:
- Scope
information_schema.partitionschecks/removals to the$tableargument instead of hardcodingsyslog. - Add
syslog_partition_table_allowed()allowlist and use MySQLGET_LOCK/RELEASE_LOCKto serialize partition creation. - Add a regression test that verifies table scoping, lock usage, and the presence of the allowlist helper; update changelog for #254.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| functions.php | Scopes partition queries to the target table, adds allowlist guard, and adds locking around partition creation. |
| tests/regression/issue254_partition_table_locking_test.php | Adds a regression check ensuring table scoping and lock acquisition/release are present. |
| CHANGELOG.md | Records the fix for issue #254 under the develop section. |
ed9f697 to
e13b1c4
Compare
somethingwithproof
added a commit
to somethingwithproof/plugin_syslog
that referenced
this pull request
Mar 10, 2026
Refs Cacti#271 Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
e13b1c4 to
c9ea44d
Compare
somethingwithproof
added a commit
to somethingwithproof/plugin_syslog
that referenced
this pull request
Mar 12, 2026
Refs Cacti#271 Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
c9ea44d to
ad8a47e
Compare
Refs Cacti#271 Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
ad8a47e to
8b8e566
Compare
TheWitness
approved these changes
Mar 16, 2026
This file contains hidden or 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
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.
Summary
Fixes #254
Validation