History log "committed" column is inaccurate
I maintainer di solito rispondono entro 4 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
Direzione di ricerca
Inizia da %IPM.General.AbstractHistory:Finalize() in src/cls/IPM/General/AbstractHistory.cls:124 e traccia i percorsi di configurazione della transazione, risoluzione della modalità sviluppatore, commit e rollback in %IPM.Utils.Module:LoadModuleFromDirectory() intorno alle righe 1137-1315. Riproduci sia il caricamento di un module.xml malformato con -dev sia l’installazione con -DNoTransaction=1; il lavoro è completo quando Committed corrisponde al fatto che le modifiche siano state effettivamente mantenute.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
The Committed column on history records does not reliably indicate whether an action's changes survived. It is computed from the action's status and whether developer mode was on, rather than from what actually happened to the transaction:
%IPM.General.AbstractHistory:Finalize() (src/cls/IPM/General/AbstractHistory.cls:124):
set ..Committed = (dev = 1) || $$$ISOK(status)
This is wrong in both directions.
Dev-mode failures are always marked committed, even when fully rolled back.
In %IPM.Utils.Module:LoadModuleFromDirectory(), the transaction opens at line 1160 and the first developer-mode tcommit is at line 1272. tDeveloperMode is not even resolved until line 1259. Everything in that window runs inside a transaction that the catch block rolls back at lines 1313-1315, regardless of developer mode.
So a -dev action that fails before line 1272 (for example a malformed module.xml rejected in GetModuleObjectFromPath) is rolled back in full, but its history record still reads Committed.
The intended dev-mode behavior for phases after line 1272 is correct and is not at issue here. The early-failure window is.
Non-transactional failures are marked uncommitted despite keeping their changes.
tUseTransactions is false when -DNoTransaction=1 or -DNoJournal=1 is passed (line 1137). No transaction is opened, so a failure leaves partial changes in the namespace. Because the status is an error and developer mode is off, the record reads Uncommitted.
To Reproduce
Rolled-back action reported as committed:
load /path/to/malformed-module -devwhere the directory contains amodule.xmlwith a syntax errorhistory find -limit 5- The record shows an error in
SuccessandCommittedinCommitted, even though the transaction was rolled back and nothing was written
Retained changes reported as uncommitted:
install some-module -DNoTransaction=1with a module whoseActivatephase failshistory find -limit 5- The record reads
Uncommitted, but partial changes remain in the namespace
Expected behavior
Committed should reflect whether the action's changes were actually retained.
Options, roughly in increasing order of effort:
- Compare
$tlevelagainst the level captured at entry, or have the rollback path signal that it ran, and pass that toFinalize()instead of inferring fromdev. - Set
Committedat each commit point rather than once at the end, so the flag tracks how far the action actually got. - If the current value is intentional as a coarse signal, rename it or document it as "changes may have been retained" and stop treating
dev = 1as sufficient.
Option 1 is the smallest change that fixes both directions, since it makes the flag observed rather than derived.
System information
- IPM version: 0.10.5+
- Lingua principale
- ObjectScript
- Stelle
- 41
- Fork
- 29
- Merge medio
- 4g 8h
- PR unite (30g)
- 8
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di intersystems/ipm
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
intersystems/ipm#1258 ·
I maintainer di solito rispondono entro 4 giorni
-
bug technical debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
intersystems/ipm#1251 ·
I maintainer di solito rispondono entro 4 giorni
-
The "MarkedForUpdate" property on %IPM.Storage.ResourceReference should have XMLPROJECTION = "NONE"Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
intersystems/ipm#1248 ·
I maintainer di solito rispondono entro 4 giorni
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
intersystems/ipm#1241 ·
I maintainer di solito rispondono entro 4 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
intersystems/ipm#1236 ·
I maintainer di solito rispondono entro 4 giorni
Tutte le issue di intersystems/ipm
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
[BUG] Re-subscribing the Mono returned by listTools/listResources/listResourceTemplates/listPrompts/listRoots duplicates the resultsForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
modelcontextprotocol/java-sdk#1174 · 1 reazione ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
NanmiCoder/cc-haha#1533 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Remove song from playlistAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
maxrave-dev/SimpMusic#2649 ·
I maintainer di solito rispondono entro 2 giorni
-
product/backlog
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
TencentBlueKing/bk-nodemgr#3645 ·
I maintainer di solito rispondono entro 1 giorno