Review Request: Ask the user whether to clean DUChain repository after multiple crashes.
floris
flo.ruijt at gmail.com
Wed Mar 9 08:23:48 UTC 2011
On Wed, 2011-03-09 at 09:01 +0100, Esben Mose Hansen wrote:
> On Tuesday 08 March 2011 23:52:13 Dmitry Risenberg wrote:
> > The bigger question - is this code still useful? I haven't experienced
> any
> > DUChain-related crashes, while crashes for other reasons still
> happen. So
> > the user might get a full reparsing if some other part of KDevelop
> > misbehaves.
>
> Wouldn't the right way to do that be to introduce some checksums so
> that we can actually test if the repository is corrupt? Say, when
> updating the repository, it could
>
> 1.a. update the repository
> 1.b at this stage, the repository is uncorrupt.
> 2. update the checksum
>
> That way, if we unhappily crashed during 1.a, some checksum would
> fail and tip KDevelop off.
>
> Of course, that will not work if the cause is that some code is simply
> writing nonsense to the repository.
>
> --
> kind regards, Esben
>
you wouldn't want to calculate the checksum of the entire repository, as
that's slow. you could try to use journaling, but I'd say that if we
actually need something like that, that we should look for an existing
filesystem/database implementation and just better suit it to our needs.
Floris
More information about the KDevelop-devel
mailing list