Repository navigation
Keep interrupts, check the HTTP status and stop abandoned feed downloads - #345
Merged
Merged
Conversation
Review follow-ups for the planet feed fetcher: - An interrupted fetch restores the thread's interrupt flag before throwing FetcherException. - A malformed feed URL fails with a FetcherException instead of the IllegalArgumentException from URI.create. - A response other than 2xx fails with its status instead of being parsed as a feed. - On Java 11, cancelling the response future doesn't stop the exchange, so a stalled feed kept downloading after the fetcher gave up. The body subscriber now cancels its subscription when the fetcher stops waiting, which closes the connection. - The timing tests allow more time, so a slow build machine doesn't fail them.
Once the feed updater's thread is interrupted, the updater now stops instead of trying every remaining subscription, and the fetcher no longer opens a request it would abandon straight away. When a download is stopped because of its HTTP status or size, the reason is recorded before the subscription is cancelled, so the HTTP client's own error from the cancel can no longer replace it. An invalid feed URL now reports "Feed URL is not valid" to the admin adding the subscription instead of the URI parser's message. The interrupt test now interrupts a fetch that is waiting for its feed, checks that the failure was caused by the interrupt and is bounded by a timeout.
snoopdave
reviewed
Nov 20, 2026
snoopdave
left a comment
Contributor
There was a problem hiding this comment.
Review of 6cbbbfdc7: The fix covers the reviewed feed fetch paths, and the new tests exercise the status, interrupt, and abandoned download behavior. Comparison with #340 found no missing fix hunks. Tests were not run under the review constraints.
No new issues found.
snoopdave
approved these changes
Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows up #326 from review, with the same changes as the master follow-up to #314. Changes to the planet feed fetcher (
RomeFeedFetcher):FetcherException.FetcherExceptioninstead of theIllegalArgumentExceptionfromURI.create.Tests: new
RomeFeedFetcherLimitsTestcases cover an abandoned download being closed, a 404, a malformed URL and a kept interrupt. The timing tests allow more time, so a slow build machine doesn't fail them.A further review pass added these fixes: