Skip to content

SOLR-18403: fix snapshot-export to actually use the named snapshot - #4807

Open
serhiy-bzhezytskyy wants to merge 2 commits into
apache:mainfrom
serhiy-bzhezytskyy:SOLR-18403-fix-snapshot-export-incremental
Open

SOLR-18403: fix snapshot-export to actually use the named snapshot#4807
serhiy-bzhezytskyy wants to merge 2 commits into
apache:mainfrom
serhiy-bzhezytskyy:SOLR-18403-fix-snapshot-export-incremental

Conversation

@serhiy-bzhezytskyy

Copy link
Copy Markdown
Contributor

https://issues.apache.org/jira/browse/SOLR-18403

SnapshotExportTool built its Backup request with setCommitName(snapshotName) but never called setIncremental(false). commitName is only read by the non-incremental backup path, so it was silently ignored and the export backed up the live index instead of the named snapshot -- no error, no warning.

Verified with a real MiniSolrCloudCluster test: indexed 5 docs, snapshotted, indexed 5 more (live index now 10), exported, restored -- got 10 docs before this fix, 5 after. Confirmed the test actually catches the regression (reverted the one-line fix locally, test failed as expected, restored it).

This predates incremental backups entirely -- the commitName-based export worked correctly before SOLR-13608 introduced incremental defaulting to true in 2021. That interaction was never revisited, and SOLR-17180 (2024) carried the bug forward unchanged when porting snapshotscli.sh into bin/solr snapshot-export.

AI-assisted (Claude Sonnet 5)

SnapshotExportTool built a Backup request with setCommitName(snapshotName)
but never called setIncremental(false) -- commitName is only read by the
non-incremental backup path, so it was silently ignored and the export
backed up the live index instead. Verified with a real MiniSolrCloudCluster
test: 5 docs snapshotted, 5 more indexed, export+restore returned 10 docs
before this fix, 5 after.
@serhiy-bzhezytskyy

Copy link
Copy Markdown
Contributor Author

Cross-referencing: #4808 (SOLR-18358) removes the same commitName/incremental capability this PR fixes. If both land, this fix becomes moot -- flagging for reviewers of either.

@epugh

epugh commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

thanks for this... Yeah, lets see what folks say about jsut removing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants