Skip to content

GH-3431: Ignore incomplete compaction directories when finding TDB2 storage - #4257

Open
Duansg wants to merge 1 commit into
apache:mainfrom
Duansg:fix-3431
Open

Duansg wants to merge 1 commit into
apache:mainfrom
Duansg:fix-3431

Conversation

@Duansg

@Duansg Duansg commented Sep 24, 2026

Copy link
Copy Markdown
Member

GitHub issue resolved #3431

Pull request Description:

If a TDB2 compaction is interrupted (e.g. the process is killed), a Data-NNNN-tmp directory is left in the database directory. It is cleaned up when the database is connected, but DatabaseOps.findStorageLocation is called earlier by Fuseki (DSGSetup → TDBOps.isTDB2 → SpotTDB2) and throws DBOpEnvException: Invalid filename for matching: Data-0002-tmp, so Fuseki fails to start.

This change makes scanForDirByPattern skip compaction temporary directories (Data-NNNN-tmp). Other unexpected Data* names still raise an error.

Added TestDatabaseCompact.compact_recovery_2, which fails without the fix. All jena-tdb2 tests pass.


  • Tests are included.
  • Documentation change and updates are provided for the Apache Jena website
  • Commits have been squashed to remove intermediate development commit messages.
  • Key commit messages start with the issue number (GH-xxxx)

By submitting this pull request, I acknowledge that I am making a contribution to the Apache Software Foundation under the terms and conditions of the Contributor's Agreement.


See the Apache Jena "Contributing" guide.

@rvesse
rvesse requested a review from afs September 24, 2026 08:08

@rvesse rvesse left a comment

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.

LGTM, I'll let @afs have chance to review before merging as this is more his area of the codebase

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.

DSGSetup.setupTDB failing with TDB2 on partial compact

2 participants