Skip to content

merge mirror.py and sync.py functionality for continous workflow #3115

Open
@vladak

Description

@vladak

Is your feature request related to a problem? Please describe.
There is a functionality gap in the approach of sync.py - it is tailored to serve as parallel tool to facilitate periodic and hence serial synchronization. This works quite well if there is not a big variance in times required to synchronize all projects however fails if there are couple of projects that take a long time, holding the rest hostage.

Describe the solution you'd like
sync.py should be able to run continuously. It can run the per project batch jobs in configurable intervals, feeding them to the pool of workers.

Describe alternatives you've considered
One way would be to rely on the existing incoming changes check in mirror.py (for SCMs that support it) that terminates the batch sequence if there are no incoming changes, another would be fold this into sync.py and use that for the polling. The SCMs that do not support polling would be synced periodically, perhaps with different interval.

There might be a problem with starvation of the quick-to-sync projects if there is enough slow-to-sync projects to occupy all the workers.

Additional context
This screams daemon I think however I'd like to avoid bringing OS specific stuff to the main OpenGrok repository. This should remain in https://github.com/OpenGrok/platform

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions