/[Apache-SVN]
ViewVC logotype

Revision 1804819


Jump to revision: Previous Next
Author: kotkov
Date: Fri Aug 11 16:32:35 2017 UTC (6 years, 8 months ago)
Changed paths: 4
Log Message:
Stream svndiff deltas without creating temporary files during 'svn commit'
over HTTP.

Creating the temporary files has a certain overhead (time to write them
and disk space), but what is more important, it prevents the client and
server from simultaneously processing the data, i.e., checksumming and
compressing it.  See the log message to r1803144 for additional details
on this.

Technically, in order to do this, we use the new apply_textdelta_stream()
delta editor callback for the wc commit.  In order to do that, we need
to make some of the used streams (mostly, with associated temporary files
on disk) properly support svn_stream_reset().

* subversion/include/private/svn_io_private.h
  (svn_stream__from_aprfile): Declare this new function.

* subversion/libsvn_subr/stream.c
  (struct baton_apr): Add new 'truncate_on_seek' field.
  (make_stream_from_apr_file): Accept a new 'truncate_on_seek' argument,
   which we'd need to properly reset streams over temporary files.
  (seek_handler_apr): Honor the new 'truncate_on_seek' field.
  (svn_stream__from_aprfile): Implement by forwarding the arguments to
   make_stream_from_apr_file().
  (svn_stream_from_aprfile2, svn_stream_for_stdin2, svn_stream_for_stdout
   svn_stream_for_stderr): Update calls to make_stream_from_apr_file(),
   don't change the existing behavior.
  (svn_stream__create_for_install): Set the temporary file to be truncated
   on seeks.

* subversion/libsvn_wc/adm_crawler.c
  (seek_handler_copy): New function.
  (copying_stream): Implement reset support in this stream.
  (open_txdelta_stream_baton_t): New.
  (open_txdelta_stream): New, implements svn_txdelta_stream_open_func_t.
   Note that this function must be restartable, as it can be called
   more than once, for example, if the HTTP server decides to do a
   renegotiation, and we would be forced to resend the whole request
   body.  If this is the case, we reset the streams and continue.
  (svn_wc__internal_transmit_text_deltas): Use the new apply_textdelta_stream()
   delta editor callback.  Calculate the MD5 checksum with the help of
   svn_stream_checksummed2() stream. Pass the disowned streams to the open
   txdelta callback.

* subversion/libsvn_wc/deprecated.c
  (): Include svn_io_private.h.
  (svn_wc_transmit_text_deltas2): Set the temporary file to be truncated
   on seeks.


Changed paths

Path Details
Directorysubversion/trunk/subversion/include/private/svn_io_private.h modified , text changed
Directorysubversion/trunk/subversion/libsvn_subr/stream.c modified , text changed
Directorysubversion/trunk/subversion/libsvn_wc/adm_crawler.c modified , text changed
Directorysubversion/trunk/subversion/libsvn_wc/deprecated.c modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26