Repository navigation
Conversation
…failed publications first. Failed publications are read oldest first, so publications that keep failing or are skipped by the resubmission filter stay at the head of the queue and, once a full batch of them has piled up, keep all other failed publications from being resubmitted. ResubmissionOptions.withLeastRecentlyAttemptedFirst() now makes the repositories read them by the date of their last resubmission instead, falling back to the publication date for the ones never resubmitted. The default order is unchanged. Signed-off-by: AdzerKI <silver_cat@list.ru>
AdzerKI
force-pushed
the
gh-1906-failed-publications-order
branch
from
October 9, 2026 18:07
be03f23 to
464037b
Compare
Contributor
Author
|
Reworked as discussed in #1906: the new order is now opt-in through |
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.
Closes #1906.
ResubmissionOptions.withLeastRecentlyAttemptedFirst()makesfindFailedPublications(…)return the least recently attempted publications first: ordered bylastResubmissionDate, falling back topublicationDatefor publications that were never resubmitted. The option reaches the repositories throughFailedCriteria. JDBC and JPA useCOALESCEin the query, Neo4jcoalesce(…)in Cypher, MongoDB an aggregation with$ifNullas a plain sort can't express the fallback. Without the option, failed publications are still read oldest first.With the option, a publication that was just resubmitted and failed again moves to the end of the queue, so publications that keep failing or are skipped by the resubmission filter no longer keep the others from being read.
Each repository test suite gets a test resubmitting the older of two failed publications and expecting it first by default and the newer one first with the option, in a batch of one. A registry unit test checks that the option ends up in
FailedCriteria.events.adocdescribes the default order and the option. The JDBC tests pass on H2, HSQLDB, PostgreSQL, MySQL, MariaDB, SQL Server and Oracle, the JPA, MongoDB and Neo4j suites pass as well.