# # # patch "netsync.cc" # from [596f07592d2fd52467f3a000ddcfa55f0f2c7986] # to [7c29d867999a70fc04cc646b4cfa94f7f980ad60] # ============================================================ --- netsync.cc 596f07592d2fd52467f3a000ddcfa55f0f2c7986 +++ netsync.cc 7c29d867999a70fc04cc646b4cfa94f7f980ad60 @@ -2267,9 +2267,9 @@ void session::maybe_step() { - if (done_all_refinements() - && !rev_enumerator.done() - && outbuf_size < constants::bufsz * 10) + while (done_all_refinements() + && !rev_enumerator.done() + && outbuf_size < constants::bufsz * 10) { rev_enumerator.step(); } @@ -2965,11 +2965,21 @@ else { I(voice == client_voice); - transaction_guard guard(app.db); + + // FIXME: this transaction guard is disabled, to make the + // client's pull "resumable" if the client hits ctrl-C. We are + // not sure this is a good optimization; some platforms (OSX?) + // are apparantly very grumpy if they do a lot of + // commits. Profile and check, possibly re-enable conditionally + // or with some form of commit-batching. + + //transaction_guard guard(app.db); + call_server(role, include_pattern, exclude_pattern, app, addr, static_cast(constants::netsync_default_port), static_cast(constants::netsync_timeout_seconds)); - guard.commit(); + + //guard.commit(); } } catch (Netxx::NetworkException & e)