ENH: Replace the selected-import transaction in DataStructure with a smaller design
I maintainer di solito rispondono entro 6 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- C++
- Stelle
- 18
- Fork
- 15
- Merge medio
- 4g 23h
- PR unite (30g)
- 42
Preparare l'ambiente
- Nessun Dockerfile né 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 BlueQuartzSoftware/simplnx
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
BlueQuartzSoftware/simplnx#1987 ·
I maintainer di solito rispondono entro 6 giorni
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
BlueQuartzSoftware/simplnx#1980 ·
I maintainer di solito rispondono entro 6 giorni
-
Testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
BlueQuartzSoftware/simplnx#1979 ·
I maintainer di solito rispondono entro 6 giorni
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
BlueQuartzSoftware/simplnx#1978 ·
I maintainer di solito rispondono entro 6 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
BlueQuartzSoftware/simplnx#1945 ·
I maintainer di solito rispondono entro 6 giorni
Tutte le issue di BlueQuartzSoftware/simplnx
Issue simili
-
bug triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
26.04 bug dark-mode Easy Hack impress symptom: visual
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
CollaboraOnline/online#16421 · 1 commento ·
-
area/cs bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ydb-platform/ydb#59881 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
documentation enhancement lua server
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100