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

For Marten backed sagas that are soft-deleted, load by id & is_deleted = false #1052

Open
jeremydmiller opened this issue Oct 1, 2024 · 1 comment
Milestone

Comments

@jeremydmiller
Copy link
Member

Little performance optimization.

come back and continue the blog series on long running workflows with this text:

"

Next, let's worry just a little bit about performance as an excuse for me to show off some more Marten functionality. Let's say that we're getting a ton of these files on a daily basis, so our database storage for FileImportSaga could be getting quite large and eventually impact database performance. But we still want to keep a database record of all the files that we read into our system, so what to do?

An experienced developer is probably going to ask about some kind of archival process where completed files are moved off into "cold" storage while active files stay in a much smaller "hot" storage to keep the database responsive over time. And you know what, Marten has some tools for exactly this kind of thing completely baked in!

Remember as part of the FileImportSaga state machine we had this code that might mark the current saga as "completed" depending on

"

@jeremydmiller
Copy link
Member Author

This is going to take a Marten change to have a LoadIfNotSoftDeleted or some such

@jeremydmiller jeremydmiller added this to the 4.0 milestone Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant