Skip to content

Improved overflow support: Fix detection of DELETED events in IndexingRescanner - #28

Merged
sungshik merged 7 commits into
improved-overflow-support-mainfrom
improved-overflow-support/fix-delete-detection-in-indexing-rescanner
Mar 26, 2025
Merged

Improved overflow support: Fix detection of DELETED events in IndexingRescanner#28
sungshik merged 7 commits into
improved-overflow-support-mainfrom
improved-overflow-support/fix-delete-detection-in-indexing-rescanner

Conversation

@sungshik

@sungshiksungshik commented Mar 26, 2025

Copy link
Copy Markdown
Contributor

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

codecovBot commented Mar 26, 2025

Copy link
Copy Markdown

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 linesPatch %Lines
...g/swat/watch/impl/overflows/IndexingRescanner.java85.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
// 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<>();

@DavyLandmanDavyLandmanMar 26, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can it be final?

@sungshiksungshik mentioned this pull request Mar 26, 2025
7 tasks
@sungshiksungshik changed the title Fix detection of DELETED events in IndexingRescannerImproved overflow support: Fix detection of DELETED events in IndexingRescannerMar 26, 2025
@sungshik
sungshik merged commit 9b0ba39 into improved-overflow-support-mainMar 26, 2025
@sungshik
sungshik deleted the improved-overflow-support/fix-delete-detection-in-indexing-rescanner branch March 26, 2025 15:57
Sign up for freeto 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

@sungshik@DavyLandman