Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlanetaryDocs: Better example of keeping database integrity across containers. #4279

Closed
maximecaron opened this issue Mar 6, 2023 · 3 comments

Comments

@maximecaron
Copy link

When updating document, one entry in Documents container and many entry in Meta container is updated.
All those entry need to be updated atomically (either all are updated or none are updated).
Otherwise the 2 container will become out of sync if the service crash after calling HandleMetaAsync but before updating the Document container.

How can this be designed to not leave the data in the DB corrupted?

@roji
Copy link
Member

roji commented Mar 6, 2023

Which database are you using?

@maximecaron
Copy link
Author

maximecaron commented Mar 6, 2023

this would be CosmosDB.
And by "corrupted" what I mean is the Tag table would refer to document that have been deleted or the document could have tag that have not been inserted in the tag table.

In both of those situation it make searching a Document by tag not work correctly.

@maximecaron maximecaron changed the title Better example of keeping database integrity across containers. PlanetaryDocs: Better example of keeping database integrity across containers. Mar 6, 2023
@roji
Copy link
Member

roji commented Mar 7, 2023

If you're looking for EF using transactions on Cosmos, that's tracked by dotnet/efcore#17308.

@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants