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
Purge: possible issue with attachments when using date ranges #6207
Comments
As a reminder, we intend the following (see #5209):
Things to check:
|
Independently from the question of attachments, here are more thoughts about things to check regarding the handling of date ranges, when present ( Historical data ADT:
In order to detect the disallowed
Tasks:
|
With date range conditions handled properly (previous comment), we make sure that we eliminate the case of orphan historical data. However, after a purge, we can have:
In the case where we exclude purging for a document id due to the data ranges condition (previous comment), we do not purge anything for the current document id. So attachments remain and we are ok. In the other cases, we iterate all current data and historical data, and gather:
In other words, the algorithm was correct, modulo unit tests and the date range issue. |
So I had written code to not purge data that would leave orphan historical data. That code is in, but with #6210 that code will not actually run. We could, in the future, enable this if desired. |
In the implementation of
completeAttachments()
, we compute the difference between some attachment paths, and then force-delete some attachments.We need to make sure that, especially when date ranges are used, we do not delete attachments that we shouldn't delete.
The text was updated successfully, but these errors were encountered: