[MGNLSYNC-57] Synchronization Manager does not handle sync requests for the same workspace Created: 27/Apr/21  Updated: 06/Oct/22  Resolved: 06/Oct/22

Status: Closed
Project: Magnolia Synchronization Module
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Brandon Murdoch Assignee: Unassigned
Resolution: Inactive Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Epic Link: Maintenance of Synchronization module
Team: Nucleus

 Description   

I'm using the synchronization manager to sync content to new publics. The first synchronization request managed by the manager will work fine, but a second request for the same workspace (to sync another public) will get stuck in a WAITING state. 

I can see this even when making use of the synchronization-rest module. 

Steps to reproduce

  1. Start up an author with some content ready to sync. (I think the website workspace will work, but all my workspaces are for content apps).
  2. Start up a public, and register it as a receiver on the author.
  3. Using the synchronization-rest module, hit the synchronization/trigger endpoint:
    https://docs.magnolia-cms.com/product-docs/Modules/List-of-modules/Synchronization-module/Synchronization-REST-module.html#_trigger_synchronization
    I.E: 
curl -u superuser:xxxxx https://cms-author-dev.deveng.systems/.rest/synchronization/v1/trigger --data '{"url" : "http://cms-public-dev-1.deveng.systems:8080", "workspace": "argos-browse-pages", "fromPath" : "/", "recursive": "true"}' --header "Content-Type: application/json"
  1. Note that, after some time, the content from the workspace you specified will be synced to the public. You can also track the progress with the status endpoint, and this will work fine. (https://docs.magnolia-cms.com/product-docs/Modules/List-of-modules/Synchronization-module/Synchronization-REST-module.html#_get_status)
    E.G: 
{ "executionStart": 1619434630223, "executionEnd": 1619434692567, "cancelled": null, "state": "DONE", "created": 1619434630191, "identifier": "synchronization-20210426-105710191", "workspace": "argos-browse-pages", "path": null, "recursive": true, "fromDate": null, "template": null, "url": "[http://cms-public-dev-1.eu-west-1.dev.deveng.systems:8080|http://cms-public-dev-1.eu-west-1.dev.deveng.systems:8080/] ", "fromPath": "/", "toPath": null }
  1. Now start up a second public, and register it as a receiver on the author.
  2. Using the synchronization-rest module, hit the synchronization/trigger endpoint again, for the new url, but the same workspace:
curl -u superuser:xxxxx https://cms-author-dev.deveng.systems/.rest/synchronization/v1/trigger --data '{"url" : "http://cms-public-dev-2.deveng.systems:8080", "workspace": "argos-browse-pages", "fromPath" : "/", "recursive": "true"}' --header "Content-Type: application/json"
  1. Make a note of the synchronization request id that the above curl returns.
  2. Note that, after some time, you will see the author begin to sync content across to the second public. However, If you use the status endpoint, you'll see that the request is stuck in a WAITING state, even after all the content is synchronized. E.G:

 

{ "executionStart": null, "executionEnd": null, "cancelled": null, "state": "WAITING", "created": 1619435706391, "identifier": "synchronization-20210426-111506391", "workspace": "argos-browse-pages", "path": null, "recursive": true, "fromDate": null, "template": null, "url": "[http://cms-public-dev-2.eu-west-1.dev.deveng.systems:8080|http://cms-public-dev-2.eu-west-1.dev.deveng.systems:8080/] ", "fromPath": "/", "toPath": null }

Expected results

The second request should correctly track the progress for synchronising that content to the new public. 

Actual results

The second synchronisation request will always state that it is WAITING. 

Workaround

Restarting author seems to fix this for one request (the second request will then get stuck WAITING again) 

Development notes



 Comments   
Comment by Mercedes Iruela [ 07/May/21 ]

Could you please confirm the version of the synchronisation module that you are using? I tried to reproduce the issue, but it seems to be working as expected for me. Thanks.

Comment by Brandon Murdoch [ 13/May/21 ]

Hey Mercedes, I didn't see this earlier in the week, sorry!

 

We're using version 1.9.1 for both synchronization and synchronization-rest

Comment by Mercedes Iruela [ 01/Jun/22 ]

Hello Brandon,

Have you suffer this issue lately? Could we close it?

Regards,
Mercedes

Generated at Mon Feb 12 07:39:27 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.