Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move datastore transition to attaching state to after summary retriev…
…ed (microsoft#20998) the primary change is to move getting the attachment summary before transitioning to attached for datastores. This also matches how the container works, specifically, capture the summary, and then transition to attaching. Since this code is all synchronous the risk of something bad happening is small, or about the same as before. Regardless of the order, having the summary retrieval decoupled from the state transition leaves open the possibility for bugs. With this change it is possible the dds state is modified after the summary is captured, so it won't be in the summary or in ops, only in memory. Conversely, in the existing code if a change happened after the attach state changed it would get an op, but it would also be in the summary, so it gets duplicated. Both of these are data corruption. The better and much bigger fix would be to get the summary as part of the transition, so as each ddses attachment summary is retrieved it then transition to attaching. this would be a substantial refactoring, and due to the code being synchronous the opportunity for these types of issues is small, and would likely represent a framework issue. Testing done as part of microsoft#20995 --------- Co-authored-by: Tony Murphy <anthonm@microsoft.com>
- Loading branch information