You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ivan Zhakov <iv...@visualsvn.com> on 2015/02/06 13:53:40 UTC

[PATCH] The reuse-ra-session branch: optimize RA session usage in merge code

Hi,

Automatic merge creates minimum 8 connection using code in trunk. The
RA cache framework implemented in reuse-ra-session reduce number of
used RA sessions to 3.

The attached patch for reuse-ra-session branch reworks merge.c a bit
to use just 2 RA sessions. It also resolves RA CACHE TODO: comment and
makes code  more clear IMO.

I'm pretty sure about the patch itself. But may be proposed changes
are out of scope ra-session-reuse branch. So this patch should be
committed to reuse-ra-session branch or to trunk after
reuse-ra-session branch will be merged to trunk. Any opinions?

[[[
Optimize and simplify RA session usage in merge code.

* subversion/libsvn_client/merge.c
  (normalize_merge_sources_internal): Open new temporary RA session if
   RA_SESSION argument is NULL. Update docstring to document new behavior.

  (ensure_ra_session_url): Remove now unused function.

  (do_merge): Remove SRC_SESSION argument and code to save/restore session
   URL for passed RA session. Open and release RA session for every merge
   source -- RA cache framework will reuse them if possible. All callers
   are updated.

  (merge_cousins_and_supplement_mergeinfo): Remove URL1_RA_SESSION and
   URL2_RA_SESSION arguments. Pass NULL as RA_SESSION argument to
   normalize_merge_sources_internal() -- it will open/release RA session
   internally. All callers are updated.

  (merge_locked): Remove SESSPOOL and release RA session early. Pass NULL
   as RA_SESSION argument to normalize_merge_sources_internal() -- it
   will open/release RA session internally.

  (merge_reintegrate_locked): Release temporary RA sessions early.

  (merge_peg_locked): Remove SESSPOOL and release RA session early.

  (do_automatic_merge_locked): Release RIGHT_RA_SESSION early. Pass NULL
   as RA_SESSION argument to normalize_merge_sources_internal().
]]]


-- 
Ivan Zhakov
CTO | VisualSVN | http://www.visualsvn.com