ENH: Replace the selected-import transaction in DataStructure with a smaller design
メンテナーはふだん 6 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Read the design review of #1934, especially decisions D1, D3, D4, D7 and D8, then inspect DataStructure, BaseGroup and ImportH5ObjectPathsAction used by ReadDREAM3DFilter. Compare the current publish and rollback failure behavior with a smaller insertion and cleanup mechanism, preserving the listed checks and import behavior. Done means simplifying the transaction, removing unnecessary states, errors and hooks, and updating tests for values, IDs, aliases and geometry references.
索引モデルが issue の本文から書いたものです。
説明
Summary
Replace the import-specific publish and rollback transaction that #1934 adds to DataStructure with a smaller design. This is a follow-up to the out-of-core review PR tree. #1934 ("Plan selected imports against the complete destination") merges with the current design. During review it was decided to merge it now and to simplify it here.
How it works after #1934
ImportH5ObjectPathsAction, used by ReadDREAM3DFilter, builds the whole selected import in a copy of the destination (the prepared structure) and then publishes it. Publishing and rollback are in DataStructure:
DataStructure::ImportPublicationCheckpoint, a public value class that records the destination and its next ID when the action starts. Publishing rejects a checkpoint from another destination (-6217) or with a changed next ID (-6218).DataStructure::publishImportedObjects(...), which inserts all prepared objects and rolls them back on failure.- Partial-cleanup states (
Conflict,Children,Refused), errors -6215 and -6216 and retained-object records for a rollback that cannot finish. - Test-only fault injection in the public
DataStructure.hppand in the action (setPublicationFaultForTesting,cleanupFailedImportForTestingand related functions).
This is about 840 lines in DataStructure and BaseGroup, and one action uses all of it.
Why it is needed
Review found no normal input that makes publishing fail after the checks that run before it. Only std::bad_alloc and injected test faults reach the cleanup states: Refused is reached only by a test hook, and no normal trigger was shown for Conflict or Children. No in-tree caller can trigger the checkpoint errors, because the resolver and the finalizer run on the prepared structure, not on the destination.
Requested change
- Keep the checks that run before publishing. Report a failure and stop the pipeline. Do not treat a failed import as complete.
- Publish with a smaller mechanism, for example the normal insert path plus a list of inserted IDs that are removed in reverse order on an exception. The mechanism is still open.
- Remove the partial-cleanup states, errors -6215 and -6216 and the retained records, unless a real case is found that needs them.
- Remove the public checkpoint class and errors -6217 and -6218, unless a current caller needs them. Keep the normal path, parent and ID checks.
- Send no
DataRemovedMessagefor objects that were inserted and then rolled back before their addition was announced. Today rollback sends removal messages, but publishing sends no addition messages. - Remove the test hooks that the smaller design no longer needs.
Do not describe the result as an all-or-nothing guarantee. An insertion can fail after it changes part of the hierarchy but before its ID is registered, and cleanup can itself allocate or fail. The existing IDataAction contract allows an inconsistent destination after an error. Before replacing the current code, check that the smaller design does not make failure behavior worse than it is now. If it does, keep the needed protection.
Keep unchanged
- Aliases (two selected paths to one source object) still import as separate copies with their own IDs and remapped geometry references.
- The prepared structure is not swapped into the destination, because a swap would replace existing objects and invalidate pointers to them.
- Both modes of the metadata cache, and the public
fetch()behavior.
Tests
Keep the existing tests of values, IDs, aliases and geometry references. Where a failure must still be tested, use a real failure when one reliably reaches the step on Linux, Windows and macOS. Keep a focused hook only for a case that cannot be reached otherwise, for example an allocation failure partway through an insertion.
The design review of #1934 lists these options as decisions D1, D3, D4, D7 and D8.
- 主要言語
- C++
- スター
- 18
- フォーク
- 15
- 平均マージ
- 4日 23時間
- マージ済み PR(30日)
- 42
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
BlueQuartzSoftware/simplnx のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
BlueQuartzSoftware/simplnx#1987 ·
メンテナーはふだん 6 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
BlueQuartzSoftware/simplnx#1980 ·
メンテナーはふだん 6 日以内に返信
-
Testing
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
BlueQuartzSoftware/simplnx#1979 ·
メンテナーはふだん 6 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
BlueQuartzSoftware/simplnx#1978 ·
メンテナーはふだん 6 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
BlueQuartzSoftware/simplnx#1945 ·
メンテナーはふだん 6 日以内に返信
BlueQuartzSoftware/simplnx の issue をすべて見る
似ている issue
-
bug triage
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
26.04 bug dark-mode Easy Hack impress symptom: visual
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
CollaboraOnline/online#16421 · コメント 1 件 ·
-
area/cs bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ydb-platform/ydb#59881 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
documentation enhancement lua server
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100