fix(core): coalesce orphan-tx warnings in ModelDb.addTxes#10927
Open
MichaelUray wants to merge 2 commits into
Open
fix(core): coalesce orphan-tx warnings in ModelDb.addTxes#10927MichaelUray wants to merge 2 commits into
MichaelUray wants to merge 2 commits into
Conversation
Per-TX 'no document found' warnings were previously emitted via ctx.warn for every orphan-targeted transaction the loader skipped. On workspaces that have evolved through multiple model versions this produces dozens of identical-looking warnings on every page load, drowning out real warnings without giving operators an actionable signal. Replace with a single coalesced ctx.info summary at the end of addTxes: total count plus a byClass breakdown. The information needed for diagnosing migration issues is still present, just consolidated. Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>
|
Connected to Huly®: UBERF-16530 |
…orphan-tx-coalesce Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>
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
ModelDb.addTxescurrently emits onectx.warn('no document found, failed to apply model transaction, skipping')for every orphan-targeted transaction the loader skips. On workspaces that have evolved through multiple model versions this produces dozens of identical-looking warnings on every page load, drowning out real warnings without giving operators an actionable signal.Change
Drop the three per-tx
ctx.warn(...)calls in the create/update/remove branches; accumulate the orphan count plus a transaction-class breakdown locally, then emit a single coalescedctx.infoat the end ofaddTxes:The diagnostic information needed for migration debugging is still present — just consolidated into one log line per call instead of M.
Why
infoinstead ofwarnOrphan-targeted transactions on long-lived workspaces are an expected outcome of model evolution (objects renamed/removed across versions). They are not actionable for operators on each load.
warnis reserved for events that need attention.Tests
memdb.test.tsadds focused coverage for the coalescing behaviour:ctx.inforecordtotalcount and concretebyClassbreakdown (TxUpdateDoc / TxRemoveDoc) are assertedno document foundwarnings are no longer emittedaddTxescall (no orphans) emits no orphan summaryDCO
Signed-off-by Michael Uray.
maintainer_can_modify=true.