Skip to content

Conversation

@sungshik
Copy link
Contributor

@sungshik sungshik commented Mar 26, 2025

Before this PR, too many DELETED events were issued by IndexingRescanner in the situation where the initial index is larger than the set of files in the scope of the watch. This PR adds a test to expose this misbehavior and a fix.

@codecov
Copy link

codecov bot commented Mar 26, 2025

Codecov Report

Attention: Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.

Project coverage is 80.8%. Comparing base (d569c50) to head (79312db).
Report is 8 commits behind head on improved-overflow-support-main.

Files with missing lines Patch % Lines
...g/swat/watch/impl/overflows/IndexingRescanner.java 85.7% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@                        Coverage Diff                         @@
##             improved-overflow-support-main     #28     +/-   ##
==================================================================
+ Coverage                              79.2%   80.8%   +1.6%     
- Complexity                              119     120      +1     
==================================================================
  Files                                    16      16             
  Lines                                   539     549     +10     
  Branches                                 53      54      +1     
==================================================================
+ Hits                                    427     444     +17     
+ Misses                                   81      74      -7     
  Partials                                 31      31             

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sungshik sungshik marked this pull request as ready for review March 26, 2025 14:26
@sungshik sungshik requested a review from DavyLandman March 26, 2025 14:26
// approximate `DELETED` events that happened since the previous rescan.
// Instances of this class are supposed to be used non-concurrently, so
// no synchronization to access this field is needed.
private Deque<Set<Path>> visited = new ArrayDeque<>();
Copy link
Member

@DavyLandman DavyLandman Mar 26, 2025

Choose a reason for hiding this comment

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

can it be final?

@sungshik sungshik mentioned this pull request Mar 26, 2025
7 tasks
@sungshik sungshik changed the title Fix detection of DELETED events in IndexingRescanner Improved overflow support: Fix detection of DELETED events in IndexingRescanner Mar 26, 2025
@sungshik sungshik merged commit 9b0ba39 into improved-overflow-support-main Mar 26, 2025
11 checks passed
@sungshik sungshik deleted the improved-overflow-support/fix-delete-detection-in-indexing-rescanner branch March 26, 2025 15:57
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.

2 participants