pydio / pydio-core

Pydio 8 official repository
https://pydio.com
GNU Affero General Public License v3.0
869 stars 289 forks source link

Lucene Indexer breaks some WebDAV uploads to zero-size files #1413

Closed pes-soft closed 6 years ago

pes-soft commented 6 years ago

Hi,

I've noticed that on Pydio 8 ( Pydio 8.0.1 and 8.0.2 on RHEL7 OS installation ) when Lucene Indexer cannot open an Office document, then storing of the file fails, file has a size zero and directory is not re-indexed, so the zero-file does not even appear immediately. When Lucene Indexer is off, WebDAV works ok. The issue does not occur in Pydio web app upload.

Here is an error visible in the web server log when upload fails:

PHP Fatal error:  Uncaught exception 'Zend_Search_Lucene_Exception' with message 'Invalid archive or corrupted .xlsx file.' in /usr/share/pydio/plugins/index.lucene/Zend/Search/Lucene/Document/Xlsx.php:101
Stack trace:
#0 /usr/share/pydio/plugins/index.lucene/Zend/Search/Lucene/Document/Xlsx.php(261): Zend_Search_Lucene_Document_Xlsx->__construct('/data/pydio/fil...', false)
#1 /usr/share/pydio/plugins/index.lucene/LuceneIndexer.php(616): Zend_Search_Lucene_Document_Xlsx::loadXlsxFile('/data/pydio/fil...')
#2 /usr/share/pydio/plugins/index.lucene/LuceneIndexer.php(561): Pydio\\Access\\Indexer\\Implementation\\LuceneIndexer->createIndexedDocument(Object(Pydio\\Access\\Core\\Model\\AJXP_Node), Object(Zend_Search_Lucene_Proxy))
#3 [internal function]: Pydio\\Access\\Indexer\\Implementation\\LuceneIndexer->updateNodeIndex(Object(Pydio\\Access\\Core\\Model\\AJXP_Node), Object(Pydio\\Access\\Core\\Model\\AJXP_Node), false)
#4 /usr/share/pydio/core/src/pydio/Core/Controller/ShutdownScheduler.php(167): call_user_func_array(Array, Array)
#5 [internal func in /usr/share/pydio/plugins/index.lucene/Zend/Search/Lucene/Document/Xlsx.php on line 101

Thanks for any hints or fixes.