History log "committed" column is inaccurate
Maintainer thường phản hồi trong vòng 4 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
Hướng nghiên cứu
Bắt đầu với %IPM.General.AbstractHistory:Finalize() tại src/cls/IPM/General/AbstractHistory.cls:124 và lần theo các nhánh thiết lập giao dịch, phân giải chế độ nhà phát triển, commit và rollback trong %IPM.Utils.Module:LoadModuleFromDirectory() quanh các dòng 1137-1315. Tái hiện cả việc tải module.xml không đúng định dạng với -dev và việc cài đặt với -DNoTransaction=1; hoàn tất khi Committed khớp với việc các thay đổi có thực sự được giữ lại hay không.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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+
- Ngôn ngữ chính
- ObjectScript
- Star
- 41
- Fork
- 29
- Merge trung bình
- 4 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 8
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của intersystems/ipm
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
intersystems/ipm#1258 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
bug technical debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
intersystems/ipm#1251 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
The "MarkedForUpdate" property on %IPM.Storage.ResourceReference should have XMLPROJECTION = "NONE"Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
intersystems/ipm#1248 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
intersystems/ipm#1241 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
intersystems/ipm#1236 ·
Maintainer thường phản hồi trong vòng 4 ngày
Tất cả issue của intersystems/ipm
Issue tương tự
-
bug help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] 增量 SSE 解析器未识别单独 CR 换行,导致事件无法及时交付Có thể đã có người làm @king-wwwhhh đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
langchain4j/langchain4j#6669 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
microsoft/playwright#43327 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
pesu-dev/discord_bot#97 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
microsoft/TypeScript#64758 ·
Maintainer thường phản hồi trong vòng 1 ngày