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

Re: svn commit: r1358725 - /subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c

From: Daniel Shahaf <danielsh_at_apache.org>
Date: Fri, 21 Jun 2013 19:28:41 +0000

On Fri, Jun 21, 2013 at 09:16:16PM +0200, Stefan Fuhrmann wrote:
> On Wed, Jun 19, 2013 at 12:37 AM, Daniel Shahaf <danielsh_at_elego.de> wrote:
>
> > stefan2_at_apache.org wrote on Sun, Jul 08, 2012 at 12:21:37 -0000:
> > > Author: stefan2
> > > Date: Sun Jul 8 12:21:36 2012
> > > New Revision: 1358725
> > >
> > > URL: http://svn.apache.org/viewvc?rev=1358725&view=rev
> > > Log:
> > > When upgrading to format 6 (or later), we must make sure that
> > > revprop shard packing is in sync with revision data shard packing.
> > >
> > > * subversion/libsvn_fs_fs/fs_fs.c
> > > (upgrade_pack_revprops): new function
> > > (upgrade_body): use the new function to pack revprop shards
> > >
> > > Modified:
> > > subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
> > >
> > > Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
> > > URL:
> > http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c?rev=1358725&r1=1358724&r2=1358725&view=diff
> > >
> > ==============================================================================
> > > --- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
> > > +++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Sun Jul 8 12:21:36
> > 2012
> > > @@ -1398,6 +1398,85 @@ create_file_ignore_eexist(const char *fi
> > > return svn_error_trace(err);
> > > }
> > >
> > > +/* In the filesystem FS, pack all revprop shards up to min_unpacked_rev.
> > > + * Use SCRATCH_POOL for temporary allocations.
> > > + */
> > > +static svn_error_t *
> > > +upgrade_pack_revprops(svn_fs_t *fs,
> > > + apr_pool_t *scratch_pool)
> > > +{
> > > + fs_fs_data_t *ffd = fs->fsap_data;
> > > + const char *revprops_shard_path;
> > > + const char *revprops_pack_file_dir;
> > > + apr_int64_t shard;
> > > + apr_int64_t first_unpacked_shard
> > > + = ffd->min_unpacked_rev / ffd->max_files_per_dir;
> > > +
> > > + apr_pool_t *iterpool = svn_pool_create(scratch_pool);
> > > + const char *revsprops_dir = svn_dirent_join(fs->path,
> > PATH_REVPROPS_DIR,
> > > + scratch_pool);
> > > + int compression_level = ffd->compress_packed_revprops
> > > + ? SVN_DELTA_COMPRESSION_LEVEL_DEFAULT
> > > + : SVN_DELTA_COMPRESSION_LEVEL_NONE;
> > > +
> > > + /* first, pack all revprops shards to match the packed revision
> > shards */
> > > + for (shard = 0; shard < first_unpacked_shard; ++shard)
> > > + {
> >
> > Would it be useful to have a progress_func here, that is called once per
> > shard or so? Otherwise, this may perform an arbitrary amount of work
> > (proportional to number of shards, i.e., O(HEAD)) with no feedback
> > during it.
> >
>
> Implemented in r1495545.

Thanks!
Received on 2013-06-21 21:28:47 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.