You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "sarkaramrit1993 (via GitHub)" <gi...@apache.org> on 2026/10/09 16:35:26 UTC
[PR] SOLR-17953: Ignore hidden files when locating an incremental backup [solr]
sarkaramrit1993 opened a new pull request, #5066:
URL: https://github.com/apache/solr/pull/5066
https://issues.apache.org/jira/browse/SOLR-17953
A .DS_Store (or any dot-prefixed file) next to the collection folder of an incremental backup made RESTORE fail with FileAlreadyExistsException, and LISTBACKUP and DELETEBACKUP fail with "expected to hold a single directory". It also let BACKUP skip its check against putting a second collection under the same backup name, since that check only ran when the folder held exactly one entry.
# Changes
- New BackupFilePaths.findCollectionDirs: drops dot-prefixed entries when the backup folder has more than one entry. A lone dot-prefixed entry is kept, since collection names can start with ".".
- RESTORE, LISTBACKUP, DELETEBACKUP and BACKUP all use it. RestoreCmd used to take the first listed entry and now goes through buildExistingBackupLocationURI like LISTBACKUP and DELETEBACKUP.
# Behavior change
RESTORE now finds the collection folder through the same BackupFilePaths lookup that LISTBACKUP and DELETEBACKUP already use:
- Folder holding two or more collections: RESTORE used to restore whichever one was listed first, silently. Now it fails with "expected to hold a single directory. Number found: 2", like LISTBACKUP and DELETEBACKUP.
- Empty or missing backup folder (e.g. a typo in the backup name): RESTORE used to fail with ArrayIndexOutOfBoundsException. Now it fails with the same message and "Number found: 0". A clearer "backup not found" error would be nice, but LISTBACKUP and DELETEBACKUP give the same message today, so I left it alone here.
# Why filter by name
Checking getPathType() for each entry would also catch Windows files like Thumbs.db, but on S3 the directory check relies on marker objects that may be missing, and it costs a request per entry.
# Not changed
- A backup folder holding only a .DS_Store is still treated as a collection folder named .DS_Store, so BACKUP into it fails. Same as before.
# Tests
- AbstractIncrementalBackupTest.testHiddenFileInBackupDir: back up, add .DS_Store, then restore, list, try backing up a different collection under the same name (rejected), and delete. Runs for LocalFS, S3 and GCS. Fails on main.
- BackupFilePathsTest: hidden file ignored, lone dot-named collection kept, two collections rejected.
Applies cleanly to branch_10x. branch_9x has import conflicts only.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-17953: Ignore hidden files when locating an incremental backup [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on PR #5066:
URL: https://github.com/apache/solr/pull/5066#issuecomment-6339621523
what version do you want this to again? Is it branch 9x or 10x?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-17953: Ignore hidden files when locating an incremental backup [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on PR #5066:
URL: https://github.com/apache/solr/pull/5066#issuecomment-6398087330
okay, since we have backports created, I have removed the Milestone Tag and will do them myself.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-17953: Ignore hidden files when locating an incremental backup [solr]
Posted by "sarkaramrit1993 (via GitHub)" <gi...@apache.org>.
sarkaramrit1993 commented on PR #5066:
URL: https://github.com/apache/solr/pull/5066#issuecomment-6351657057
Thanks Eric! I'd like it in both. You hit it on 9.8.1 and 9x is still taking backports. I've opened the backports myself so you don't have to resolve anything: [#5197](https://github.com/apache/solr/pull/5197) for `branch_10x` and [#5198](https://github.com/apache/solr/pull/5198) for `branch_9x`. The only conflict was in `BackupCmd`, since both branches still have the non-incremental backup path.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-17953: Ignore hidden files when locating an incremental backup [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh merged PR #5066:
URL: https://github.com/apache/solr/pull/5066
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-17953: Ignore hidden files when locating an incremental backup [solr]
Posted by "sarkaramrit1993 (via GitHub)" <gi...@apache.org>.
sarkaramrit1993 commented on PR #5066:
URL: https://github.com/apache/solr/pull/5066#issuecomment-6151616390
@epugh when you get a chance, could you approve the CI run here? It's the .DS_Store backup restore bug you reported in SOLR-17953.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-17953: Ignore hidden files when locating an incremental backup [solr]
Posted by "sarkaramrit1993 (via GitHub)" <gi...@apache.org>.
sarkaramrit1993 commented on PR #5066:
URL: https://github.com/apache/solr/pull/5066#issuecomment-6332746828
@epugh gentle nudge on this one too, it's the .DS_Store restore bug you reported in SOLR-17953. Could you approve the CI run and take a look when you get a chance? Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org