| Summary: | Installing a plan and bundle at the same time results in race conditions | ||
|---|---|---|---|
| Product: | [RT] Virgo | Reporter: | Alex Blewitt <alex.blewitt> |
| Component: | unknown | Assignee: | Chris Frost <eclipse> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | eclipse, glyn.normington |
| Version: | 3.0.0.M01 | ||
| Target Milestone: | 3.0.0.M04 | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Alex Blewitt
repository/usr is a watched directory and so it is scanned at start-up and periodically thereafter. The period between scans defaults to 5 seconds and can be configured using the property repository-name.watchInterval described in the user guide. So perhaps a workaround would be to set the period to 1 second and have the automated build pause for a little over 1 second before installing the plan. I don't suppose this will help, but please note there is a mxbean for repository/usr with a forceCheck operation to force a scan. If the automated build could drive the mbean, that would be a better workaround. The build is generated by a copy mechanism, and it copies all files over (which are in a repository/usr and pickup/ structure already) so it's the same copy mechanism. Granted, this could be worked around by doing it in 2 copy operations or by tickling the mbean, but it would be nicer if it Just Worked (TM). If the usr/ repository is periodically re-scanned anyway, and you know when a file has been picked up in the 'pickup', you could schedule a usr/repository rescan ahead of executing the pick'd up code. It would be a little slower, but it would ensure that when dropping in a plan, the state of the system is consistent. Yes, I'm sure there is a robust solution to this bug. I was simply pointing out some workarounds for the interim. (In reply to comment #3) > Yes, I'm sure there is a robust solution to this bug. I was simply pointing out > some workarounds for the interim. Ah, OK. I just used "The Windows Way (tm)" - if it doesn't work first time, run it again. On the second install the plan picks up the artifacts deployed from last time. It's ugly, but it works :-) Compare https://bugs.eclipse.org/bugs/show_bug.cgi?id=327538#c2 when considering triggering a re-scan of a watched repository. The RepositoryFactory now published all watched repos in the service registry under the WatchedRepository interface. They are all then obtained and checked before the deployer pipeline is run. PipelinedApplicationDeployerIntegrationTests have been updated to check for the calls to check watched repositories. |