verify without cache -
10-23-2003
, 08:15 AM
Hi,
how can i use verifying without cache.
In 'db_verify.c' we use cache in this code :
---------------------------------------------------------
private = 0;
if ((ret =
dbenv->open(dbenv, home, DB_INIT_MPOOL | DB_USE_ENVIRON,
0)) != 0) {
if ((ret = dbenv->set_cachesize(dbenv, 0, cache, 1))
!= 0) {
dbenv->err(dbenv, ret, "set_cachesize");
goto shutdown;
}
private = 1;
if ((ret = dbenv->open(dbenv, home,
DB_CREATE | DB_INIT_MPOOL | DB_PRIVATE | DB_USE_ENVIRON,
0)) != 0) {
dbenv->err(dbenv, ret, "open");
goto shutdown;
}
}
-------------------------------------------------------------
where 'cache' size is define aka MEGABYTE.
In verify i don't want use cache.
I have DB(database).I make this procedur open->DB after read->DB, then
close DB(some procedure is bad and crash this DB).
Now, when i run 'db_verify' on this DB, is everything OK, but when i
remove enviroments and then run 'db_verify' it put a DB is broken. I
think it's because 'db_verify' check DB from cache(enviroments) and i
don't need this.
Tnak you for yours answers |