Community
Participate
Working Groups
Build Identifier: 4.0 A replication from a synchronizable repository may take a long time (even if raw replication is enabled). It would be nice to have a indication that the sync is ongoing and how much is already replicated. This indication could be one of the following: -> Bytes transferred -> Number of object types already synchronized -> ? Reproducible: Always
> It would be nice to have a indication that the sync is ongoing and how much is > already replicated. Where would you like to receive these indications, on the master repository, the master clients, the clone repository or the clone clients? > This indication could be one of the following: > -> Bytes transferred That's hardly possible ;-( > -> Number of object types already synchronized That's next to impossible for raw replication. > -> ? I'd suggest to just inform about the progress in form of percentage numbers. Okay?
Starting to implement in-process notification from the clone repository to registered listeners... Later we may consider to make progress notification available to clients of the clone.
(In reply to comment #2) > Starting to implement in-process notification from the clone repository to > registered listeners... > > Later we may consider to make progress notification available to clients of the > clone. That's exactly what I wanted ;-)
Progress monitoring makes everything so ugly. Always ;-(
Created attachment 176610 [details] Patch v1 - for future reference
You can now register a progress listener as follows: clone.getSynchronizer().addListener(new IListener() { @Override public void notifyEvent(IEvent event) { if (event instanceof ProgressEvent) { ProgressEvent e = (ProgressEvent)event; int workPercent = (int)e.getWorkPercent(); msg(e.getTask() + ": " + workPercent + "%"); } } }); Please note that it's next to impossible to evenly distribute the progress for all possible cases of modification during OFFLINE. I've tried to make it as concise as possible for the average case. Committed to HEAD.
I forgot to mention one thing: With little (and no real-life) data it's hard to judge whether the progress distribution is good, feels good, etc. IIRC even the distribution between java.sql.Statement.addBatch() and executeBatch() is driver-dependent and can easily proof assumptions wrong. If you feel that it could be done differently/better, please reopen...
(In reply to comment #1) > > It would be nice to have a indication that the sync is ongoing and how much is > > already replicated. > > Where would you like to receive these indications, on the master repository, > the master clients, the clone repository or the clone clients? > > > This indication could be one of the following: > > -> Bytes transferred > > That's hardly possible ;-( I'll try to achieve this with a stream wrapper.
Available in R20110608-1407