Fredrik Jonson created MRM-1628:
-----------------------------------
Summary: Silently ignore request to delete artifacts that does not exist on disk anymore
Key: MRM-1628
URL:
https://jira.codehaus.org/browse/MRM-1628 Project: Archiva
Issue Type: Wish
Affects Versions: 1.3.5
Reporter: Fredrik Jonson
Priority: Minor
Attachments: archiva.patch
I have a snapshot repository that grew very large with a huge number of artifacts due to a misconfiguration on the repository purger. As a quick fix I removed the artifacts directly on the filesystem of the the snapshot repository.
After correcting the repository purge config I got ERROR level log messages that stated:
Unable to delete non-existing project directory:
And the error seems to reoccur every time the snapshot purge was executed (some kind of rollback?).
The attached patch removes the throw clause (it mostly seems to add verbosity to the system?) Maybe the exception should be caught instead, somewhere further up the food chain. It wasn't obvious to me where it would be apropriate though. Thus the quick fix of not throwing the Exception at all.
Here's the stacktrace:
2012-05-04 18:38:01,787 [pool-2-thread-1] ERROR org.apache.maven.archiva.repository.scanner.functors.ConsumerProcessFileClosure - Consumer [repository-purge
] had an error when processing file [/home/archiva/archiva-base/data/repository/foo-snapshot/com/example/foo/1.6.4-SNAPSHOT/foo-1.6.4-20100826.134549-1.pom]: Unable to delete non-existing project directory.
org.apache.maven.archiva.consumers.ConsumerException: Unable to delete non-existing project directory.
at org.apache.maven.archiva.consumers.core.repository.RepositoryPurgeConsumer.processFile(RepositoryPurgeConsumer.java:180)
at org.apache.maven.archiva.consumers.core.repository.RepositoryPurgeConsumer.processFile(RepositoryPurgeConsumer.java:187)
at org.apache.maven.archiva.repository.scanner.functors.ConsumerProcessFileClosure.execute(ConsumerProcessFileClosure.java:61)
at org.apache.commons.collections.functors.IfClosure.execute(IfClosure.java:117)
at org.apache.commons.collections.CollectionUtils.forAllDo(CollectionUtils.java:388)
at org.apache.maven.archiva.repository.scanner.RepositoryScannerInstance.directoryWalkStep(RepositoryScannerInstance.java:161)
at org.codehaus.plexus.util.DirectoryWalker.fireStep(DirectoryWalker.java:174)
at org.codehaus.plexus.util.DirectoryWalker.scanDir(DirectoryWalker.java:392)
at org.codehaus.plexus.util.DirectoryWalker.scanDir(DirectoryWalker.java:386)
at org.codehaus.plexus.util.DirectoryWalker.scanDir(DirectoryWalker.java:386)
at org.codehaus.plexus.util.DirectoryWalker.scanDir(DirectoryWalker.java:386)
at org.codehaus.plexus.util.DirectoryWalker.scanDir(DirectoryWalker.java:386)
at org.codehaus.plexus.util.DirectoryWalker.scanDir(DirectoryWalker.java:386)
at org.codehaus.plexus.util.DirectoryWalker.scanDir(DirectoryWalker.java:386)
at org.codehaus.plexus.util.DirectoryWalker.scan(DirectoryWalker.java:345)
at org.apache.maven.archiva.repository.scanner.DefaultRepositoryScanner.scan(DefaultRepositoryScanner.java:125)
at org.apache.maven.archiva.repository.scanner.DefaultRepositoryScanner.scan(DefaultRepositoryScanner.java:67)
at org.apache.maven.archiva.scheduled.executors.ArchivaRepositoryScanningTaskExecutor.executeTask(ArchivaRepositoryScanningTaskExecutor.java:141)
at org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$ExecutorRunnable$1.run(ThreadedTaskQueueExecutor.java:116)
...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspaFor more information on JIRA, see:
http://www.atlassian.com/software/jira