lgo in subversion

Fix stalls during checkout/update over http(s): when one connection is slower

than the other connections, up to REQUEST_COUNT_TO_RESUME requests can queue

up on that connection. When that happens, ra_serf will completely stop sending

requests until the slower connection has catched up.

The solution is to assign requests to the connection with the least amount of

pending requests.

Note: requires serf trunk@2421.

* subversion/libsvn_ra_serf/update.c

(get_best_connection): Add a better method to assign requests to connections,

based on the minimum number of pending requests on a connections. Keep the

current method of simply cycling connections for serf<1.4.0.

Revert the changes in [1] that added the new "http-pipelining" option.

The issue that triggered addition of this option - serf issue 135: ssl

renegotiation breaks when there are pipelined requests - has been solved

in serf directly.

More specifically: serf 1.4 will automatically disable http pipelining for

connections to a server that initiates a SSL renegotiation.

[1] r1619072, r1619074, r1619079.

* CHANGES: list the new 'http-pipelining' config option.
Add an option "http-pipelining" to the servers configuration, so that a user

can disable HTTP pipelining in case that causes problems, e.g. during SSL

renegotiation triggered by the server to request a client certificate.

* subversion/include/svn_config.h

(SVN_CONFIG_OPTION_HTTP_PIPELINING): New boolean config option.

* subversion/libsvn_ra_serf/ra_serf.h

(struct svn_ra_serf__session_t): New member variable http_pipelining.

* subversion/libsvn_ra_serf/serf.c

(load_config): Load the value of the new option from the servers file. If not

set, use 'HTTP pipelining is enabled' by default.


ra_serf_dup_session): Set the max. nr. of outstanding requests to 1

if HTTP pipelining is disabled.

* subversion/libsvn_ra_serf/update.c

(open_connection_if_needed): Set the max. nr. of outstanding requests to 1

if HTTP pipelining is disabled.

* subversion/libsvn_subr/config_file.c

(svn_config_ensure): Add the 'http-pipelining' option in the comment section

of the initial servers file.

Fix building svn trunk on Mac OS X with the gnome keyring lib installed.

Don't check for gnome keyring and kwallet on Mac OS X. While these libraries are

available on the platform - you get libgnome-keyring when installing Gimp via

MacPorts - the auth providers' functions and symbols are currently not declared

on Mac OS X and Windows.


* build/ac-macros/kwallet.m4: Don't check for kwallet and gnome keyring on

darwin platforms.

On the 1.8.x branch:

* STATUS: Add gstein's vote for r1511057 (issue #4044).

On the 1.8.x branch:

* STATUS: Propose r1511057 (issue #4044) for backport.

Fix issue 4044 in ra_serf: return the right error code if the server doesn't

support a particular feature, so that callers of the ra layer can enable a

fallback mechanism or report a meaningful error to the user.

* subversion/libsvn_ra_serf/util.c

(svn_ra_serf__error_on_status): When the server returns a 501 Not Implemented

status code, create an SVN_ERR_UNSUPPORTED_FEATURE error.

* STATUS: Approved the r1489117 group, propose 1500837 for backport.
Modify '411 Content length required' error message to point the user to the

busted-proxy option.

* subversion/libsvn_ra_serf/util.c

(svn_ra_serf__error_on_status): Modify error text of status code 411.

Enable and the test suite to be run with a proxy that

requires authentication and is installed on another host.

* build/

(TestHarness.__init__): Add http_proxy_username and http_proxy_password

arguments. Pass these through to svntest.main.

(main): Add http-proxy-username and http-proxy-password command-line


* subversion/tests/cmdline/

(BASE_URL): Allow the user to specify a BASE_URL other than http://localhost,

needed when using a proxy on another host.

* subversion/tests/cmdline/svntest/

(create_config_dir): When provided, add lines in the servers config file for

http-proxy-username and http-proxy-password.

(_create_parser): Add http-proxy-username and http-proxy-password command-line


* STATUS: Add +0 with remark for the busted-proxy group.
* STATUS: Propose r1495850 for backport to 1.8.x.
Fix a crash in TSVN when receiving a property update on a directory with local

property modifications.


* subversion/libsvn_wc/update_editor.c

(close_directory): Use eb->cancel_baton instead of eb->conflict_baton for the

cancel_baton parameter in the call to svn_wc__conflict_invoke_resolver.

ra_serf: Add comment to clarify the usage of bulk updates with older servers.

* subversion/libsvn_ra_serf/update.c

(make_update_reporter): Add comment to explain that ra_serf will always use

bulk updates to a server older than 1.8.0.

Follow up r1417642: a 1.8 server will send a header that indicates the

preferred update request mode (skelta or bulk). Use the value of this header

when deciding what to do:

- Server doesn't allow bulk updates (Off): use skelta mode.

- Server prefers bulk updates (Prefer): use bulk update mode.

- Server allows bulk updates (On) or is pre-1.8: use skelta mode or mode as set

by the user in the config file.

* subversion/libsvn_ra_serf/options.c

(capabilities_headers_iterator_callback): read the new header.

* subversion/libsvn_ra_serf/ra_serf.h

(struct svn_ra_serf__session_t): new server_allows_bulk member.

* subversion/libsvn_ra_serf/update.c

(make_update_reporter): Use the new header (if set) and the user's config

to decide on the use of bulk update or skelta mode.

* subversion/libsvn_subr/config_file.c: Fix typo in comment.
Follow up r1417639: older clients with serf don't support bulk update mode, so

the server can't force it.

Changed it slightly, so that the server admin can express preference -

SVNAllowBulkUpdates Off for mandatory skelta, Prefer for bulk updates if

supported by the client, and On for "client decides".

A 1.8 server will now add a header in the OPTIONS response which indicates

these server preferences, so that ra_serf can react properly.

* subversion/include/svn_dav.h

(SVN_DAV_ALLOW_BULK_UPDATES): Add svn header for OPTIONS response.

* subversion/mod_dav_svn/dav_svn.h

(enum dav_svn__bulk_upd_conf): Rename option from FORCE to PREFER.

* subversion/mod_dav_svn/mod_dav_svn.c


const command_rec cmds): Rename option from Force to Prefer.

* subversion/mod_dav_svn/reports/update.c

(dav_svn__update_report): If bulk updates are allowed, set send-all=true, but

only if the client asked for this mode.

* subversion/mod_dav_svn/version.c

(get_option): Add the SVN_DAV_ALLOW_BULK_UPDATES header to the OPTIONS


Add a bulk-updates option to the global and per-server section in servers.

This allows a user to disable the default skelta mode of ra_serf back to bulk

update mode.

* subversion/include/svn_config.h

(SVN_CONFIG_OPTION_BULK_UPDATES): New option in servers file.

* subversion/libsvn_ra_serf/ra_serf.h

(struct svn_ra_serf__session_t): New member variable.

* subversion/libsvn_ra_serf/serf.c

(load_config): Load the global or per server group bulk-updates flag.

* subversion/libsvn_ra_serf/update.c

(make_update_reporter): Remove the compile-time flag

SVN_RA_SERF__UPDATES_SEND_ALL and replace it with the new runtime option.

Update comments.

* subversion/libsvn_subr/config_file.c

(svn_config_ensure): Add new directive in the default servers file.

Add a Force option to SVNAllowBulkUpdates. This allows a server admin to always

respond to an update-report request with all content and properties inline.

Now that skelta mode will be the new default with ra_serf, this feature can be

useful in certain situations where the admin wants to avoid the overhead

of per-file GET requests (e.g. with per-request Kerberos authentication).

* subversion/mod_dav_svn/dav_svn.h

(dav_svn__bulk_upd_conf): New enum.

(struct dav_svn_repos): Change type of bulk_updates member.

(dav_svn__get_bulk_updates_flag): Change type of return value.

* subversion/mod_dav_svn/mod_dav_svn.c

(struct dir_conf_t): Change type of bulk_updates member.

(create_dir_config): Use new enum values.

(SVNAllowBulkUpdates_cmd): Parse the new Force option.

(dav_svn__get_bulk_updates_flag): Change type of return value.

(command_rec cmds[]): Update the definition of SVNAllowBulkUpdates.

* subversion/mod_dav_svn/reports/update.c

(dav_svn__update_report): If the Force flag is set, set the send_all flag,

even if the client requested skelta mode!

ra_serf: handle an incoming 408 Request Timeout response as an error, so that

we can give an error message to the user.

Requires serf 1.2 for this response to be passed to svn.

* subversion/libsvn_ra_serf/util.c

(handle_response): Treat 408 status code as error, discard the error response

body and raise the error to the caller.

ra_serf: Reuse the 4th connection for GET and PROPFIND requests when the

REPORT response is completely received.

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__process_pending): Add network_eof output argument.

* subversion/libsvn_ra_serf/util.c

(svn_ra_serf__process_pending): Fill in the new network_eof output argument

with the current 'received status' of the REPORT response.

* subversion/libsvn_ra_serf/update.c

(report_context_t): Add report_received member variable.

(get_best_connection): Add the first connection to the round-robin list

when the REPORT is completely received.

(finish_report): Update call to svn_ra_serf__process_pending.

ra_serf: Avoid assert when REPORT response was truncated by the server.

* subversion/libsvn_ra_serf/update.c

(finish_report): If all data of the REPORT response was received but the

closing update-report tag not encounted during parsing, something must have

been wrong. Don't try to close the directories as there might be

inconsistencies in their status + this will result in an assert.

ra_serf: Limit the amount of bytes read from the spillbuf that contains the

update-report response per iteration, so that network traffic and disc i/o is

better interleaved.

This has benefits of reducing the risk of connection timeouts - due to

serf_context_run being called more regularly, and seems to improve performance.

* subversion/libsvn_ra_serf/util.c

(svn_ra_serf__process_pending): Set a limit to the amount of bytes read from

then pending buffer per call to this function.

Replace r1395777, r1395786: assume the server only supports HTTP/1.0, upgrade

to HTTP/1.1 when the response indicates that it's possible.

Keep adding the "Connection: keep-alive" header for HTTP/1.0 requests.

This should make ra_serf work over all HTTP/1.0 proxies.

* subversion/libsvn_ra_serf/serf.c

(svn_ra_serf__open): Set HTTP/1.0 as default.

* subversion/libsvn_ra_serf/util.c

(handle_response): Upgrade to HTTP/1.1 when possible. Remove the code that

checks for specific error messages from the server, we now only need to

verify the version in the status line.

Follow up to r1395777: consider 400, 411 and 501 as indications that

the server/proxy does not support HTTP/1.1. Retry those requests first with


* subversion/libsvn_ra_serf/util.c

(handle_response): If in HTTP/1.1 mode and one of three status codes

are returned, fall back to HTTP/1.0.

Enable support for proxies that don't support HTTP/1.1 (or partially):

assume the server supports HTTP/1.1, fall back if needed.

This fixes issue #3979.

* subversion/libsvn_ra_serf/serf.c

(svn_ra_serf__open): Enabled http1.1 by default (as-is).

* subversion/libsvn_ra_serf/util.c

(setup_serf_req): Add Connection:keep-alive header to a request on a known

HTTP/1.0 connection.

(handle_response): If either "411 Length Required" or a successfull response

with HTTP/1.0 version in the status line, fall back to HTTP/1.0.

* STATUS: propose backport of r1388975.
On the '1.7.x-r1388975' branch: merge r1388975 from trunk.
    • ?
Create a backport branch for r1388975.