Skip to content

GH-5787 Fix SHACL shutdown interrupt race#5788

Merged
hmottestad merged 1 commit intomainfrom
GH-5787-shacl-shutdown-interrupt-race
Apr 24, 2026
Merged

GH-5787 Fix SHACL shutdown interrupt race#5788
hmottestad merged 1 commit intomainfrom
GH-5787-shacl-shutdown-interrupt-race

Conversation

@hmottestad
Copy link
Copy Markdown
Contributor

GitHub issue resolved: #5787

Briefly describe the changes proposed in this PR:

Fixes a SHACL shutdown race where an interrupt between hasNext() and next() during statement transfer could surface as NoSuchElementException instead of RDF4J's interrupted Sail path.

This PR updates ConnectionHelper.transferStatements(...) to translate interrupted iteration failures into InterruptedSailException while preserving non-interrupt NoSuchElementException behavior, and adds focused regression coverage for both paths.

Fixes #5787


PR Author Checklist (see the contributor guidelines for more details):

  • my pull request is self-contained
  • I've added tests for the changes I made
  • I've applied code formatting (you can use mvn process-resources to format from the command line)
  • I've squashed my commits where necessary
  • every commit message starts with the issue number (GH-xxxx) followed by a meaningful description of the change

Validation:

  • python3 .codex/skills/mvnf/scripts/mvnf.py --module core/sail/shacl --retain-logs --tail 500 ConnectionHelperTest
  • mvn -o -Dmaven.repo.local=.m2_repo -pl core/sail/shacl '-PslowTestsOnly,!skipSlowTests' -DskipITs=false '-Dit.test=ShutdownDuringValidationIT#shutdownDuringValidationTransactional' verify
  • cd scripts && ./checkCopyrightPresent.sh
  • mvn -o -Dmaven.repo.local=.m2_repo -q -T 2C process-resources
  • mvn -T 1C -o -Dmaven.repo.local=.m2_repo -Pquick clean install

@hmottestad hmottestad marked this pull request as ready for review April 24, 2026 04:47
@hmottestad hmottestad merged commit 249486d into main Apr 24, 2026
12 checks passed
@hmottestad hmottestad deleted the GH-5787-shacl-shutdown-interrupt-race branch April 24, 2026 07:53
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.

SHACL shutdown validation can surface interrupted iteration as NoSuchElementException

1 participant