phi...@apache.org writes: > Author: philip > Date: Tue Mar 18 12:57:22 2014 > New Revision: 1578853 > > URL: http://svn.apache.org/r1578853 > Log: > Make svnserve recognise when the client does not want inherited > properties. This fixes a performance problem with 1.8 servers > sending too much data.
An implementation bug causes svnserve to mishandle the nominally optional want-iprops flag for get-dir and get-file with the result that the server keeps sending properties even when the client doesn't want them, this can be a serious performance regression. (The want-iprops flags was documented/released with 1.8 but isn't used by the released client which uses get-iprops instead.) The problem is fixed on trunk and nominated for 1.8 with 1578853. We could add a client-side workaround for buggy servers, see the patch below. We could do this for trunk, 1.8, even 1.7. Is it a good thing to do? Index: subversion/libsvn_ra_svn/client.c =================================================================== --- subversion/libsvn_ra_svn/client.c (revision 1578900) +++ subversion/libsvn_ra_svn/client.c (working copy) @@ -1371,7 +1371,10 @@ static svn_error_t *ra_svn_get_dir(svn_ra_session_ if (dirent_fields & SVN_DIRENT_LAST_AUTHOR) SVN_ERR(svn_ra_svn__write_word(conn, pool, SVN_RA_SVN_DIRENT_LAST_AUTHOR)); - SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "!))")); + /* Always send the, nominally optional, want-iprops as "false" to + workaround a bug in svnserve 1.8.0-1.8.9 that causes the server + to see "true" if it omitted. */ + SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "!)b)", FALSE)); SVN_ERR(handle_auth_request(sess_baton, pool)); SVN_ERR(svn_ra_svn__read_cmd_response(conn, pool, "rll", &rev, &proplist, Index: subversion/libsvn_ra_svn/marshal.c =================================================================== --- subversion/libsvn_ra_svn/marshal.c (revision 1578900) +++ subversion/libsvn_ra_svn/marshal.c (working copy) @@ -2092,7 +2092,10 @@ svn_ra_svn__write_cmd_get_file(svn_ra_svn_conn_t * SVN_ERR(write_tuple_end_list(conn, pool)); SVN_ERR(write_tuple_boolean(conn, pool, props)); SVN_ERR(write_tuple_boolean(conn, pool, stream)); - SVN_ERR(writebuf_write_short_string(conn, pool, ") ) ", 4)); + /* Always send the, nominally optional, want-iprops as "false" to + workaround a bug in svnserve 1.8.0-1.8.9 that causes the server + to see "true" if it omitted. */ + SVN_ERR(writebuf_write_short_string(conn, pool, " false ) ) ", 11)); return SVN_NO_ERROR; } -- Philip Martin | Subversion Committer WANdisco // *Non-Stop Data*