Checkout
Ivan Zhakov
committed
on 19 Sep 15
[Reverted in r1704255]

Introduce RA session pool in libsvn_client for managing and reusing RA session
for different URLs.

Discussion: "Mer… Show more
[Reverted in r1704255]

Introduce RA session pool in libsvn_client for managing and reusing RA session

for different URLs.

Discussion: "Merge ra-reuse-session branch to trunk or not?" [1]

More details are available in branch history [2].

[1] http://svn.haxx.se/dev/archive-2015-09/0173.shtml

[2] ^/subversion/branches/reuse-ra-session@1704029

* subversion/include/private/svn_client_private.h

 (svn_client__ra_session_from_path2): Update docstring to mention that RA

  session may be returned back to RA session pool by

  svn_client__ra_session_release() function.

 (svn_client__ra_session_release): New function declaration.

* subversion/libsvn_client/add.c

* subversion/libsvn_client/blame.c

* subversion/libsvn_client/cat.c

* subversion/libsvn_client/checkout.c

 (mkdir_urls, svn_client_blame5, svn_client_cat3,

  svn_client__checkout_internal): Release locally created sessions if there

  were no errors.

 

* subversion/libsvn_client/client.h

 (svn_client__ra_cache_t): Add new type declare.

 (svn_client__private_ctx_t): Add RA_CACHE field.

* subversion/libsvn_client/commit.c

 (check_url_kind_baton): Remove POOL, SESSION and REPOS_ROOT_URL -- they

  were used as local RA session pool.

 (check_url_kind): Just use svn_client_open_ra_session2() and

  svn_client__ra_session_release() instead of trying to reparent existing

  RA session.

 (svn_client_commit6): Update baton initialization and release locally

  created sessions if there were no errors.

* subversion/libsvn_client/copy.c

* subversion/libsvn_client/copy_foreign.c

* subversion/libsvn_client/ctx.c

* subversion/libsvn_client/delete.c

* subversion/libsvn_client/diff.c

* subversion/libsvn_client/export.c

* subversion/libsvn_client/externals.c

* subversion/libsvn_client/import.c

* subversion/libsvn_client/info.c

* subversion/libsvn_client/iprops.c

* subversion/libsvn_client/list.c

* subversion/libsvn_client/locking_commands.c

* subversion/libsvn_client/log.c

* subversion/libsvn_client/mtcc.c

* subversion/libsvn_client/prop_commands.c

 (pin_externals_prop, repos_to_repos_copy,  repos_to_repos_copy,

  wc_to_repos_copy,  repos_to_wc_copy,  svn_client__copy_foreign,

  delete_urls_multi_repos, diff_repos_repos, diff_repos_wc,

  svn_client_export5, handle_external_item_change, svn_client_import5,

  svn_client_info4, get_inheritable_props,  list_internal, release_locks,

  svn_client__get_copy_source, svn_client_log5, svn_client__mtcc_commit,

  propset_on_url): Release locally created sessions if there were no errors.

* subversion/libsvn_client/merge.c

 (ensure_ra_session_url): Add TODO comment to use release RA sessions back

  to RA session pool.

 (do_merge): Reduce scope of second RA session and return it early back to

  RA session pool.

 (merge_locked, merge_peg_locked, find_automatic_merge_no_wc,

  client_find_automatic_merge, do_automatic_merge_locked): Release locally

  created sessions if there were no errors.

* subversion/libsvn_client/mergeinfo.c

 (svn_client__get_wc_or_repos_mergeinfo_catalog, get_mergeinfo,

  logs_for_mergeinfo_rangelist, svn_client__mergeinfo_log,

  svn_client_suggest_merge_sources): Release locally created sessions if

  there were no errors.

* subversion/libsvn_client/ra.c

 (): Include "ra_cache.h"

 (svn_client__open_ra_session_internal): Use

  svn_client__ra_cache_open_session() to open RA session, instead of direct

  call to svn_ra_open4().

 (svn_client__repos_locations, svn_client__get_youngest_common_ancestor):

  Release RA sessions after we finished using them.

 (svn_client__ra_session_release): New.

* subversion/libsvn_client/ra_cache.c

* subversion/libsvn_client/ra_cache.h

 (MAX_INACTIVE_SESSIONS, INACTIVE_SESSION_TIMEOUT, cache_entry_t,

  open_tmp_file, get_wc_prop, set_wc_prop, push_wc_prop, invalidate_wc_props,

  progress_func, cancel_func, get_client_string,  get_wc_contents,

  check_tunnel_func,  open_tunnel_func,  cleanup_ra_cache,

  svn_client__ra_cache_init, close_ra_session, remove_inactive_entry,

  expunge_cache_entries, find_session_by_url, open_new_session,

  get_private_ra_cache, svn_client__ra_cache_open_session,

  svn_client__ra_cache_release_session): New.

* subversion/libsvn_client/status.c

* subversion/libsvn_client/switch.c

* subversion/libsvn_client/update.c

* subversion/libsvn_client/util.c

 (reporter_finish_report, svn_client_status6, switch_internal,

  svn_client__update_internal, svn_client_get_repos_root): Release locally

  created sessions if there were no errors.

* tools/dev/ra-cache-summary.py: New script to analyze debugging output of

 RA session reuse.

Show less