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

Fix deleting files within 60sec interval #62

Merged
merged 1 commit into from
Sep 3, 2021

Conversation

sruti1312
Copy link
Contributor

Signed-off-by: Sruti Parthiban [email protected]

Is your feature request related to a problem? Please provide an existing Issue # , or describe.
#61

Writer metrics are filling up the disk. Currently, the cleanup method deletes the writer files (https://github.com/opensearch-project/performance-analyzer/blob/main/src/main/java/org/opensearch/performanceanalyzer/writer/EventLogQueueProcessor.java#L190)
This method deletes files up to the current time, but the file creation happens after this. Thus one file is left out during the file deletion. This cause accumulation of writer files.

Describe the solution you are proposing
Delete writer files only when they are older than 60sec.

Additional context
Add any other context or screenshots about the feature request here.

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@codecov-commenter
Copy link

Codecov Report

Merging #62 (d9899ea) into main (f184f0b) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main      #62      +/-   ##
============================================
- Coverage     72.18%   72.15%   -0.03%     
  Complexity      356      356              
============================================
  Files            44       44              
  Lines          2509     2510       +1     
  Branches        160      160              
============================================
  Hits           1811     1811              
- Misses          592      593       +1     
  Partials        106      106              
Impacted Files Coverage Δ
...ormanceanalyzer/writer/EventLogQueueProcessor.java 60.71% <0.00%> (-0.74%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f184f0b...d9899ea. Read the comment docs.

Copy link
Member

@kkhatua kkhatua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM +1

@sruti1312 sruti1312 merged commit 4c925ee into main Sep 3, 2021
@sruti1312 sruti1312 deleted the feature/fix-writer-metrics-deletion branch September 3, 2021 04:53
@dblock
Copy link
Member

dblock commented Sep 5, 2021

This kind of bugs definitely needs tests.

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.

5 participants