core icon indicating copy to clipboard operation
core copied to clipboard

Restore existing snapshots create failed copies inside dotsecure/essnapshot

Open shaydotcms opened this issue 10 years ago • 3 comments

When you upload a same existing snapshot, the system will continue creating failed copies inside /dotsecure/essnapshot

Expected Behavior

The system should avoid creating failed copies of the existing snapshot

Steps to Reproduce

1-Login to dotcms 2-Navigate to System> Maintenance> Index tab. Right click over any index and select "Download Index Snapshot" 3-After the index has downloaded, click "Restore Index Snapshot" button. 4-Upload the index you have just downloaded. The first time the system creates essnapshot folder. See image below: image

5-Once the index has uploaded, repeat the process and upload the same existing snapshot again. 6-You will get notified by UI that an unexpected error occurred and a copy of the failed snapshot will be placed inside /dotsecure/essnapshot. In addition, the path /dotsecure/essnapshot/snapshot is created. 7-If you keep uploading the same existing snapshot over and over, the system will continue creating failed copies. Image below shows 5 attempts of uploading the same snapshot 5 times: image

Your Environment

  • dotCMS version used: master-3.7
  • Browser Name and version: Firefox v45.0.1
  • Operating System and version: Ubuntu 14.04.1
  • Application Server and version: Tomcat 8
  • Java Brand and version: Java 8
  • Database and version: Postgres 9.3.5

shaydotcms avatar Nov 07 '16 15:11 shaydotcms

Nice catch @shaydotcms

dsilvam avatar Nov 07 '16 15:11 dsilvam

PR: https://github.com/dotCMS/core/pull/10172

maurizo avatar Nov 22 '16 20:11 maurizo

Passed QA. No failed copies are created when you upload a same existing snapshot. Tested on dotcms 3.7 distro / Ubuntu 14.04.1 / Postgres 9.3.5

shaydotcms avatar Nov 28 '16 15:11 shaydotcms