On Mon, Nov 24, 2014 at 4:32 PM, Julian Foad <julianf...@btopenworld.com>
wrote:

> Stefan Fuhrmann wrote:
> [...]
> > I'm in favour of phasing linear repos out. We still have to support
> > them but forgetting to check for shard size 0 is more likely to
> > happen for new code than existing code.I also tend to issuing
> > a warning or even failure when trying to upgrade a linear repos. [...]
>
> Can we feasibly convert an unsharded repo to sharded during an upgrade?
>

Yes, that would be feasible. OTOH, there is already
/tools/server-side/fsfs-reshard.py


> I think the current upgrade takes O(1) time,


Well for packed repos, the upgrade from f4 to f6 or
f7 already is O(N) because the revprops get packed.


> and sharding would take at least Order(N) time (N = number of revs) to
> move each rev file into a shard directory, and possibly much higher order
> if there are disk file systems that have slow 'move' performance (given
> that the original directory might have a very large number of rev files in
> it), but it might be acceptable given that in those cases the performance
> of adding new revs was probably degrading for the same reason.
>

I guess the most tricky part will be recovery from
a failed upgrade. Given that active linear repos
that people want to upgrade should be rare by now,
I think simply directing them to the reshard script is
acceptable and clearly the lower risk option.

-- Stefan^2.

Reply via email to