[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

serf property caching

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: 2007-08-08 21:25:45 CEST

Hi all.

I've been trying to get copy tests 56, 57, 58, 59, the multiple copy
tests, passing over ra_serf, and here's what I've discovered. As part
of the copy logic, and we use the svn_ra_get_log2() interface to
determine the old revision at a given path. The problem is an abort()
not on the first, but subsequent calls to svn_ra_serf__get_log().

svn_ra_serf__get_log() uses svn_ra_serf__retrieve_props(() to get a
resource's properties from the server, which can then be fetched using
svn_ra_serf__get_ver_prop(). On the first call to retrieve_props(),
everything works as expected, and the correct values are interested into
the props cache, and can retrieved from the props hash. On subsequent
calls, the props are are already cached, but aren't making it back to
get_log(), which leads to the abort().

The property we are interested in here is DAV:href, which gets returned
correctly the first time. The second time it doesn't, because we aren't
explicitly asking for it, but rather the set of checked_in_props. (This
set does *not* contain DAV:href, and I don't know why the initial call
to retrieve_props() succeeds.) When I use all_props instead of
checked_in_props, the DAV:href gets pulled from the cache correctly, and
we don't hit the abort().

Is my analysis correct? Is this the right way to solve this problem, or
does it just treat the symptom, and not the disease? Is there a
performance issue with using all_props?

The attached patch is my change. If nobody objects, I'll commit this in
the next couple of days.

-Hyrum

[[[
Fix copy tests 56, 57, 58, and 59 over ra_serf. The DAV:href property
is not part of the check_in_props group, so we need to use all_props to
ensure that it is properly fetched from the cache during multiple calls
to svn_ra_serf__retrieve_props()

* subversion/libsvn_ra_serf/log.c
  (svn_ra_serf__get_log): Use retrieve all_props when retrieving
  properties of the vcc_url.
]]]

Received on Wed Aug 8 21:24:06 2007

This is an archived mail posted to the Subversion Dev mailing list.