Skip to content

Publish loaded streams under the snapshot mutex - #1183

Merged
matteius merged 3 commits into
mainfrom
ai-findings-autofix/src-core-config.c
Nov 26, 2026
Merged

matteius merged 3 commits into
mainfrom
ai-findings-autofix/src-core-config.c

Conversation

@matteius

@matteius matteius commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Findings addressed

  • Load database stream rows into a temporary buffer, then reset and publish stream slots under the same mutex used by config snapshots. Verify the target stream array and capacity still match the initial snapshot before publishing.
  • Duplicate the private config staging descriptor with close-on-exec for the in-place save fallback.

Verification

Built lightnvr and test_config; all 81 config tests passed.

matteius and others added 3 commits November 26, 2026 03:45
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
@matteius matteius changed the title Potential fixes for 2 code quality findings Publish loaded streams under the snapshot mutex Nov 26, 2026
@matteius
matteius marked this pull request as ready for review November 26, 2026 08:50
@matteius
matteius merged commit b8118f7 into main Nov 26, 2026
4 of 12 checks passed
@matteius
matteius deleted the ai-findings-autofix/src-core-config.c branch November 26, 2026 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant