Subject: | cds_lock() and locked() not available in BerkeleyDB::Hash |
Hi Paul,
I'm trying to do some concurrency testing of BerkeleyDB and am getting the following unexpected error:
Can't locate object method "locked" via package "BerkeleyDB::Hash" at ./db_test_bdb4-nd.pl line 34.
I get a similar error if I try to access cds_lock(). The docs state that both of these functions are available to all of the modules. I am using the DB_INIT_LOCK flag when opening the database as follows:
$bdb4_hash = BerkeleyDB::Hash->new (
-Filename => "bdb4.hash.test",
-Flags => (DB_CREATE | DB_INIT_LOCK)
) or die "Cannot open file bdb4.hash.test: $! $BerkeleyDB::Error\n" ;
Is this a bug?
Also, many of the sections dealing with concurrent access are undocumented. My initial tests seem to indicate that BerkeleyDB drops records that it cannot insert due to no access to db. Can you point me to some examples or other documentation?
Thanks,
William