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

[26.x] The number of records deleted are doubled every run #3282

Conversation

AndreasMoth
Copy link
Contributor

@AndreasMoth AndreasMoth commented Mar 17, 2025

Every time SafeApplyRetentionPolicy is called, the number of records
deleted more than doubles. This is because we first set number of
deleted records to the number already deleted ex. 1000, then cleanup
records (it will increase this value further say it deletes 100, now
1100), then TotalNumberOfRecordsDeleted is incremented to 2100 instead
of just 1100.
Fixes AB#571357

Every time SafeApplyRetentionPolicy is called, the number of records
deleted more than doubles. This is because we first set number of
deleted records to the number already deleted ex. 1000, then cleanup
records (it will increase this value further say it deletes 100, now
1100), then TotalNumberOfRecordsDeleted is incremented to 2100 instead
of just 1100.
Fixes
[AB#571294](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/571294)
@AndreasMoth AndreasMoth requested a review from a team as a code owner March 17, 2025 09:24
@JesperSchulz JesperSchulz changed the title The number of records deleted are doubled every run [26.x] The number of records deleted are doubled every run Mar 17, 2025
@github-actions github-actions bot modified the milestone: Version 26.1 Mar 17, 2025
@AndreasMoth AndreasMoth merged commit d37d303 into releases/26.x Mar 17, 2025
26 of 28 checks passed
@AndreasMoth AndreasMoth deleted the private/anmoth/TotalNumberOfRecordsDeletedOverflow-26.x branch March 17, 2025 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants