Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push Publishing: Partial Deletion when Push + Delete is selected on Push Task #9053

Closed
joseorsini opened this issue May 6, 2016 · 4 comments

Comments

@joseorsini
Copy link
Contributor

joseorsini commented May 6, 2016

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:

  1. Setup a Push Publishing Environment with 1 node per each Endpoint.
  2. Create a test page under /about-us/. For testing purposes, let's call this page '/about-us/halfway-there'
  3. Push it to the Receiver Side.
  4. Make sure that the page has been pushed and Identifier is the same. Open a Query tool and search the page by its identifier.
  5. On Sender Site, add the Page to a Bundle and Download for Unpublish.
  6. 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:
screen shot 2016-05-06 at 2 02 33 pm

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 | parent_path | asset_name | host_inode | asset_type | syspublish_date | sysexpire_date
--------------------------------------+-------------+-------------+--------------------------------------+------------+-----------------+----------------
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 | parent_path | asset_name | host_inode | asset_type | syspublish_date | sysexpire_date
----+-------------+------------+------------+------------+-----------------+----------------
(0 rows)

@joseorsini
Copy link
Contributor Author

note: If we push again this page and push+delete again, it breaks and shows a similar behavior of what's described here #8984

@joseorsini
Copy link
Contributor Author

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

@maurizo
Copy link
Contributor

maurizo commented Jun 3, 2016

This is fixed on 3.6 by #7512

@maurizo maurizo removed their assignment Jun 3, 2016
@shaydotcms shaydotcms self-assigned this Jun 3, 2016
@shaydotcms
Copy link

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

@shaydotcms shaydotcms removed their assignment Jun 6, 2016
@dsilvam dsilvam closed this as completed Jun 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants