On Wed, May 7, 2014 at 12:59 AM, Andy Bradford
<amb-sendok-1402034378.gfecjnjggaibliman...@bradfords.org> wrote:
> Thus said Rich Neswold on Wed, 16 Apr 2014 15:40:23 -0500:
>
>> It  would be  nice  if  fossil would  break  the  "pull" into  smaller
>> transactions which  contain valid  timeline commits  so, if  there's a
>> database timeout, the next time I  try to "pull" it can continue where
>> it left off.
>
> I've  been working  a bit  on implementing  a per  round-trip commit  as
> suggested by Richard and it  does commit in smaller transactions, though
> not all of them will be valid timeline commits:
>
> http://www.fossil-scm.org/index.html/info/d02f144d708e89299ae28a2b99eeb829a6799c5f
>
> Basically it does a commit each round trip and defers execution of hooks
> until the last round-trip happens. I'm  not convinced if this is correct
> behavior---specifically,  should it  execute them  even if  there is  an
> error during sync?

I was thinking of attacking the problem a little higher up (since I'm
way too nervous touching the low-level stuff):

The idea is to add a command line option to indicate that you want a
partial sync (e.g. --pull-limit 10000). This option would only be
honored for pulls -- if pushes are occurring, ignore the option
because it complicates finding an interruption point for both pulls
and pushes.

Process cards as they come in and decrement the counter when a card
that represents a "checkpoint" has been completed. When the counter is
zero, we break the outer loop (set 'go' to 0):

https://www.fossil-scm.org/index.html/artifact/dace4194506b2ea732ca27f68300b156816e403a?ln=1482

When the loop is exited, all the database closing hooks are done and
we simply haven't transferred all the history. Issuing another pull
will transfer N more artifacts. Eventually, the full history will be
transferred.

Of course, if the command line option isn't given, then process cards
until the sender says they're done sending.

-- 
Rich
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to