Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
7.0.X, 7.1.X, Master
-
7.1.x, 7.0.x
-
Committed
-
1
-
2
Description
Steps to reproduce (master: b82083420f217cad70a99532ebf3145e92366a94):
1. Add a Basic Document called "test.pdf" using any local file available.
2. Add a Shortcut in Liferay DXP site to "test.pdf".
3. Export the Liferay DXP site.
Result: The site is exported successfully.
4. In the database, introduce an integrity corruption by deleting the DLFileEntry:
delete from DLFileEntry where title = 'test.pdf';
5. Clear the database cache in control panel -> Server Administration.
6. Relaunch the export.
Result: Export fails as expected with the following error on page:
An unexpected error occurred with the publication process. Please check your portal and publishing configuration. The model.resource.com.liferay.portal.repository.liferayrepository.model.LiferayFileShortcut: 9c47c4fa-a236-4bad-fc36-0ff2712a762b has missing reference(s) that could not be found during the process.
However, the File handle to temp file is not released.
linux$ lsof | grep liferay | grep deleted java 29553 emma 87w REG 259,1 522 14527211 /home/linux/Liferay/bundles/dxp/master/tomcat-9.0.6/temp/0ee24845-1b82-95f2-a448-a7c248888c4b.zip (deleted)
If your OS is wins, please use "handle -p 15328" (15328 is liferay process) (https://docs.microsoft.com/en-us/sysinternals/downloads/handle) to check this. You also will find the temp file can't be deleted from directory.
Expected Behavior:
Temp file should not display as opened file. We should close the file stream.