[Pkg-torrus-maintainers] Bug#476356: Bug#476356: After upgrade torrus fails with DB_VERSION_MISMATCH

Joerg Dorchain joerg at dorchain.net
Mon May 5 10:07:18 UTC 2008


tags #476356 patch,upstream
thanks

On Sun, May 04, 2008 at 10:33:18AM +0200, Marc Haber wrote:
> 
> Unfortunately, I do currently not have the time to write this
> ten-liner as I don't know enough about berkeley db. I am therefore
> tagging this bug "help" and would appreciate if somebody could write
> such a script.

Maybe the attached one line patch could help. To my understanding of
torrus, perl, and berkeley-db it should fix the bug without side
effects.

In stead of citing large parts of docu I'd rather like to point here to
http://search.cpan.org/dist/BerkeleyDB/BerkeleyDB.pod and
http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/env_open.html#DB_RECOVER

Maybe comments and restriction needs to be adjusted as well, as during
the recovery access must be single-threaded, which is currently the
case. The obvious alternative would be to run a single db-recovery
thread upfront, or more complicated solutions as using DB_REGISTER or
running only when the first open gives a DB_VERSION_MISMATCH error.


Bye,

Joerg

--- /usr/share/perl5/Torrus/DB.pm.orig	2008-05-05 11:41:11.000000000 +0200
+++ /usr/share/perl5/Torrus/DB.pm	2008-05-05 11:46:04.000000000 +0200
@@ -76,7 +76,7 @@
             umask 0002;
             $Torrus::DB::env =
                 new BerkeleyDB::Env(-Home  => $Torrus::Global::dbHome,
-                                    -Flags => (DB_CREATE |
+                                    -Flags => (DB_CREATE | DB_RECOVER | DB_INIT_TXN |
                                                DB_INIT_CDB | DB_INIT_MPOOL),
                                     -Mode  => 0664,
                                     -ErrFile => $Torrus::DB::dbEnvErrFile);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-torrus-maintainers/attachments/20080505/47c4d5af/attachment.pgp 


More information about the Pkg-torrus-maintainers mailing list