Events not searchable after migration if event was subject to a workflow with two publish-engage operations

Steps to reproduce

Steps to reproduce:
1. In a 3.x build, publish an event with a workflow which contains two publish-engage operations. Make sure that the published event is playable via player of your choice.
2. upgrade 3.x to 4.x using the process described in https://docs.opencast.org/r/4.x/admin/upgrade/
3. Complete the reindexing (recreateIndex endpoint).

Actual Results:
Events which were subject to the workflows with double publish-engage operations are not searchable via the /search endpoint.

Expected Results:
Events subject to a workflow with a double publish-engage operations should be searchable after migration just as they are searchable prior to migration.

Workaround (if any):
Delete solr-indexes, 'null'-ify deletion_date record in mh_search table for relevant events and recreate indexes.

See PublishEngageWorkflowOperationHandler.java:760 and SearchServiceImpl.java:435. In the least, the second publication should remove the deletion_date from the event in the mh_search table.

Activity

Show:
Stephen Marquard
November 17, 2017, 9:11 AM

This would be a problem also for anyone who rebuilt their search index in 3.x.

duncan smith
November 17, 2017, 9:07 AM

Logs of second publication:
2017-11-17 10:56:03,434 | INFO | pool-75-thread-1 | (PublishEngageWorkflowOperationHandler:759) - Retracting already published Elements for Mediapackage: fe711777-deb9-4d1f-bf35-baa999f9670b
2017-11-17 10:56:08,277 | INFO | pool-68-thread-1 | (SearchServiceImpl:431) - Removing mediapackage fe711777-deb9-4d1f-bf35-baa999f9670b from search index
2017-11-17 10:56:08,290 | INFO | pool-68-thread-1 | (SearchServiceImpl:436) - Removed mediapackage fe711777-deb9-4d1f-bf35-baa999f9670b from search persistence
2017-11-17 10:56:18,501 | INFO | pool-75-thread-1 | (PublishEngageWorkflowOperationHandler:384) - Publishing media package fe711777-deb9-4d1f-bf35-baa999f9670b to search index

Result of above in SQL:
mysql> select id, deletion_date from mh_search where deletion_date is not null;
-----------------------------------------------------------+

id

deletion_date

-----------------------------------------------------------+

fe711777-deb9-4d1f-bf35-baa999f9670b

2017-11-17 10:56:08

-----------------------------------------------------------+
1 row in set (0.00 sec)

Fixed and reviewed

Assignee

Unassigned

Reporter

duncan smith

Severity

Non Functioning