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

Fixed problem with file delete in CleanupService #350

Merged
merged 5 commits into from
May 23, 2024

Conversation

rbreesems
Copy link
Contributor

@rbreesems rbreesems commented May 11, 2024

This fixes #349 as per the discussion in the issue.

I believed old posts were being deleted but the count was not being reported correctly as the count reporting from the query was done after the posts were deleted. I tested this theory on a simple test using sample code from:
https://learn.microsoft.com/en-us/dotnet/api/system.linq.queryable.where?view=net-8.0

and it checked out.

I have tested the deleteFiles function on sample data.

@rbreesems
Copy link
Contributor Author

rbreesems commented May 11, 2024

Pushed a fix, had to move the delete code into the main task because of logger usage. Built a docker container and tested on local machine. If this PR is accepted, would appreciate a new updated official socializer container.
image

@rbreesems
Copy link
Contributor Author

rbreesems commented May 11, 2024

I added a new commit that takes into account a target disk utilization when deleting posts. This does not have to be used, if a target disk utilization is specified as < 0 then only post age is used. I realized that by adding this, can use a large postAge (like 3 days or so) and not worry about filling up the disk even if a lot of traffic generators as the posts will be deleted on as needed basis. I have built the docker container and tested this locally.

image

@rbreesems rbreesems marked this pull request as draft May 13, 2024 15:15
@rbreesems
Copy link
Contributor Author

I have converted to draft as I am having problems computing disk utilization correctly on Docker containers. I am investigating.

@rbreesems rbreesems marked this pull request as ready for review May 13, 2024 16:27
@rbreesems
Copy link
Contributor Author

Now ready for review.

@sei-dupdyke sei-dupdyke merged commit fb687da into cmu-sei:master May 23, 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

Successfully merging this pull request may close these issues.

new socializer code for pruning posts fails to prune posts and images
2 participants