-
Notifications
You must be signed in to change notification settings - Fork 3
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
Event table purger #16
Event table purger #16
Conversation
.Where(x => x.EventTime < olderThanUtc && | ||
x.IsProcessed == true) | ||
.Take(Options.BatchSize) | ||
.ExecuteDeleteAsync(cancellationToken); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need db.SaveChangesAsync
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
await WorkflowPurger.PurgeWorkflows(WorkflowStatus.Complete, DateTime.UtcNow); | ||
await EventsPurger.PurgeEvents(DateTime.UtcNow); | ||
await EventsPurger.PurgeEvents(DateTime.UtcNow); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why purge two times?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed
9aa6cc9
into
SergiiKram:idempotent-workflow-start
Describe the change
Implemented Event table purger
Describe your implementation or design
Implemented EventsPurger in a similar way to WorkflowPurger.
Tests
Yes
Breaking change
No
Additional context
We had 16 million rows and it broke our PROD.