Push Publishing: Partial Deletion when Push + Delete is selected on Push Task
Reproduced in 3.2.4 with client data. Support Ticket: https://my.dotcms.com/tickets/detail.dot?id=d907ba5f-1bdd-4dd0-b7fc-46360013bd70
Also reproduced in 3.5 + Java 1.8 + Postgres Db (Starter).
Please follow the next steps to reproduce it:
- Setup a Push Publishing Environment with 1 node per each Endpoint.
- Create a test page under /about-us/. For testing purposes, let's call this page '/about-us/halfway-there'
- Push it to the Receiver Side.
- Make sure that the page has been pushed and Identifier is the same. Open a Query tool and search the page by its identifier.
- On Sender Site, add the Page to a Bundle and Download for Unpublish.
- Upload the Bundle to the Receiver Side. Logs will indicate the page has been deleted
[06/05/16 13:56:19:220 EDT] INFO rest.PublishThread: Started bundle publish process
[06/05/16 13:56:19:267 EDT] INFO business.ESContentletAPIImpl: UserId : system : delete : User trying to delete the following contents[6731e087-0260-464a-821c-6dca33490a14]
[06/05/16 13:56:19:288 EDT] INFO db.DotConnect: Executing delete from tree where child in ('81fd57bd-5525-40cd-a8fa-ff2d274bcf71') or parent in ('81fd57bd-5525-40cd-a8fa-ff2d274bcf71')
[06/05/16 13:56:19:289 EDT] INFO db.DotConnect: Executing delete from multi_tree where child in ('81fd57bd-5525-40cd-a8fa-ff2d274bcf71') or parent1 in ('81fd57bd-5525-40cd-a8fa-ff2d274bcf71') or parent2 in ('81fd57bd-5525-40cd-a8fa-ff2d274bcf71')
[06/05/16 13:56:19:322 EDT] INFO rest.PublishThread: Finished bundle publish process
however, if we go to the Query Tool on Receiver side, we will see this:

The Query Tool will return 1 result, however, no ContentMap is pulled for that Content. Same content on SENDER side shows the ContentMap as expected.
Data on Sender Side:
35sender=# select * from identifier where id = '6731e087-0260-464a-821c-6dca33490a14'; id | parentpath | assetname | hostinode | assettype | syspublishdate | sysexpiredate --------------------------------------+-------------+-------------+--------------------------------------+------------+-----------------+---------------- 6731e087-0260-464a-821c-6dca33490a14 | /about-us/ | halfway-there | 48190c8c-42c4-46af-8d1a-0cd5db894797 | contentlet | | (1 row)
Data on Receiver side:
35receiver=# select * from identifier where id = '6731e087-0260-464a-821c-6dca33490a14'; id | parentpath | assetname | hostinode | assettype | syspublishdate | sysexpiredate ----+-------------+------------+------------+------------+-----------------+---------------- (0 rows)
note: If we push again this page and push+delete again, it breaks and shows a similar behavior of what's described here https://github.com/dotCMS/core/issues/8984
Stacktrace related to latest comment
[06/05/16 14:07:02:540 EDT] INFO rest.PublishThread: Started bundle publish process
[06/05/16 14:07:02:577 EDT] INFO business.ESContentletAPIImpl: UserId : system : delete : User trying to delete the following contents[6731e087-0260-464a-821c-6dca33490a14]
[06/05/16 14:07:02:588 EDT] INFO db.DotConnect: Executing delete from tree where child in ('75eb18d2-4b2a-4356-b143-8931a2ebe372') or parent in ('75eb18d2-4b2a-4356-b143-8931a2ebe372')
[06/05/16 14:07:02:589 EDT] INFO db.DotConnect: Executing delete from multi_tree where child in ('75eb18d2-4b2a-4356-b143-8931a2ebe372') or parent1 in ('75eb18d2-4b2a-4356-b143-8931a2ebe372') or parent2 in ('75eb18d2-4b2a-4356-b143-8931a2ebe372')
[06/05/16 14:07:02:623 EDT] ERROR db.HibernateUtil: ---------- DotHibernate: error on rollbackTransaction ---------------
org.postgresql.util.PSQLException: Cannot rollback when autoCommit is enabled.
[06/05/16 14:07:02:623 EDT] ERROR business.PublisherAPIImpl: Error Publishing Bundle: Unable to close Hibernate Session
com.dotmarketing.exception.DotHibernateException: Unable to close Hibernate Session
at com.dotmarketing.db.HibernateUtil.closeSession(HibernateUtil.java:738) ~[dotcms_3.5_g14af2ce.jar:?]
at com.dotmarketing.db.HibernateUtil.commitTransaction(HibernateUtil.java:763) ~[dotcms_3.5_g14af2ce.jar:?]
at com.dotcms.publisher.receiver.BundlePublisher.process(BundlePublisher.java:165) [dotcms_3.5_g14af2ce.jar:?]
at com.dotcms.rest.PublishThread.run(PublishThread.java:41) [dotcms_3.5_g14af2ce.jar:?]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_60]
Caused by: java.lang.RuntimeException: com.dotmarketing.business.DotStateException: No version info. Call setWorking first
at com.dotcms.content.elasticsearch.business.ESContentletIndexAPI$1.run(ESContentletIndexAPI.java:315) ~[dotcms_3.5_g14af2ce.jar:?]
at com.dotmarketing.db.HibernateUtil$RunnablesExecutor.run(HibernateUtil.java:707) ~[dotcms_3.5_g14af2ce.jar:?]
at com.dotmarketing.db.HibernateUtil.closeSession(HibernateUtil.java:729) ~[dotcms_3.5_g14af2ce.jar:?]
... 4 more
Caused by: com.dotmarketing.business.DotStateException: No version info. Call setWorking first
at com.dotmarketing.business.VersionableAPIImpl.isWorking(VersionableAPIImpl.java:221) ~[dotcms_3.5_g14af2ce.jar:?]
at com.dotmarketing.portlets.contentlet.model.Contentlet.isWorking(Contentlet.java:400) ~[dotcms_3.5_g14af2ce.jar:?]
at com.dotcms.content.elasticsearch.business.ESContentletIndexAPI.indexContentletList(ESContentletIndexAPI.java:340) ~[dotcms_3.5_g14af2ce.jar:?]
at com.dotcms.content.elasticsearch.business.ESContentletIndexAPI.access$100(ESContentletIndexAPI.java:45) ~[dotcms_3.5_g14af2ce.jar:?]
at com.dotcms.content.elasticsearch.business.ESContentletIndexAPI$1.run(ESContentletIndexAPI.java:309) ~[dotcms_3.5_g14af2ce.jar:?]
at com.dotmarketing.db.HibernateUtil$RunnablesExecutor.run(HibernateUtil.java:707) ~[dotcms_3.5_g14af2ce.jar:?]
at com.dotmarketing.db.HibernateUtil.closeSession(HibernateUtil.java:729) ~[dotcms_3.5_g14af2ce.jar:?]
... 4 more
[06/05/16 14:07:02:638 EDT] ERROR lang.String: Error Publishing: com.dotmarketing.exception.DotHibernateException: Unable to close Hibernate Session
[06/05/16 14:07:02:638 EDT] INFO rest.PublishThread: Finished bundle publish process
This is fixed on 3.6 by #7512
Passed QA. Download for Unpublish deletes the page on the Receiver Side Query Tool is returning 0 results after the page is deleted. DB query shows 0 rows in receiver side after the page is deleted
Tested locally in: (reciever) master-3.6 // Win7 Pro SP1 // MySQL 5.7.11 // Firefox (sender) master-3.6 // Mac OS 10.10 // MySQL 5.6.23 // Chrome