Fix/daqstorage unhandled promise rejection#2214
Open
zarch wants to merge 2 commits intofrangoteam:masterfrom
Open
Fix/daqstorage unhandled promise rejection#2214zarch wants to merge 2 commits intofrangoteam:masterfrom
zarch wants to merge 2 commits intofrangoteam:masterfrom
Conversation
added 2 commits
February 24, 2026 16:53
- Fix 1: verify _insertTagValue propagates the actual DB error reason instead of undefined when a write fails on a closed database - Fix 2: verify no UnhandledPromiseRejection is raised when addDaqValues is called concurrently and the data-overload guard fires
- _insertTagValue now calls reject(err) instead of reject() so the rejection reason is the actual SQLite error instead of undefined - addDaqValues attaches no-op .catch() handlers to orphaned promises when the data-overload guard fires, preventing unhandled rejections
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.
📌 Description
Problem: The DAQ storage layer emitted recurring UnhandledPromiseRejection errors paired with daqstorage.data-overload warnings on every poll cycle when a device tag was being stored.
Two bugs in
server/runtime/storage/sqlite/index.jscaused this:Changes:
🧪 Type of Change
Please mark the relevant option:
🚫 Build Artifacts Check
Please confirm:
/client/dist🔍 Checklist
📝 Additional Notes
The issue manifests as a pair of log lines repeating on every poll cycle (typically every 1–3 s):
The regression tests verify both failure modes: running npm test with the fix reverted reproduces the failures, and with the fix applied all tests pass.