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

The number of records deleted are doubled every run #3281

Merged

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#571294

@AndreasMoth AndreasMoth requested a review from a team as a code owner March 17, 2025 08:32
@github-actions github-actions bot added this to the Version 27.0 milestone Mar 17, 2025
@AndreasMoth AndreasMoth merged commit 8b8d267 into main Mar 17, 2025
28 checks passed
@AndreasMoth AndreasMoth deleted the private/anmoth/TotalNumberOfRecordsDeletedOverflow branch March 17, 2025 09:06
AndreasMoth added a commit that referenced this pull request 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#571294](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/571294)
AndreasMoth added a commit that referenced this pull request 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#571294](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/571294)
AndreasMoth added a commit that referenced this pull request 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#571294](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/571294)
AndreasMoth added a commit that referenced this pull request 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#571294](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/571294)
AndreasMoth added a commit that referenced this pull request 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#571294](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/571294)
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