I have an application that can have up to 10k documents associated with a single Payment instruction. The Aggregate design is a multi-entity aggregate: Payment-Inst-Aggr ->{Documents-Aggr}.
Payments Instruction and its associated Documents are received in a large JSON file.
The Create command (of the Payment-Inst-Aggr) creates all its Document-Aggr instances. In case of a failure of the Create command after creating a certain number of Document-Aggr instances, the Payment-Inst-Aggr’s create command is repeated. The latter leaves a previous partially created Payment-Inst aggr-> with its Document-Aggr instances, as an “orphaned” aggregate instance. Hence the question above.
Could be a design issue too?