On Nov 21, 2009, at 4:35 PM, Ivan Zhakov wrote: > On Fri, Nov 20, 2009 at 10:06 PM, <hwri...@apache.org> wrote: >> Author: hwright >> Date: Fri Nov 20 19:05:42 2009 >> New Revision: 882679 >> >> URL: http://svn.apache.org/viewvc?rev=882679&view=rev >> Log: >> Enable packing of revision properties into a mutable sqlite database. >> >> Patch by: Paul Querna <chip{_AT_}force-elite.com> >> me >> > >> iterpool = svn_pool_create(pool); >> for (i = min_unpacked_rev / max_files_per_dir; i < completed_shards; i++) >> @@ -7260,9 +7496,20 @@ >> SVN_ERR(pack_shard(data_path, pb->fs->path, i, max_files_per_dir, >> pb->notify_func, pb->notify_baton, >> pb->cancel_func, pb->cancel_baton, iterpool)); >> - /* We can't pack revprops, because they aren't immutable :( >> - If we ever do get clever and figure out how to pack revprops, >> - this is the place to do it. */ >> + } >> + >> + for (i = min_unpacked_revprop / max_files_per_dir; i < completed_shards; >> i++) >> + { >> + svn_pool_clear(iterpool); >> + >> + if (pb->cancel_func) >> + SVN_ERR(pb->cancel_func(pb->cancel_baton)); >> + >> + SVN_ERR(pack_revprop_shard(pb->fs, >> + revprops_path, pb->fs->path, i, >> + max_files_per_dir, >> + pb->notify_func, pb->notify_baton, >> + pb->cancel_func, pb->cancel_baton, >> iterpool)); > You have to write-lock repository since revision properties can be > changed during populating SQLite database. For example if repository > being synced using svnsync.
We currently grab the write lock for the entire packing process (see svn_fs_fs__pack()). -Hyrum