ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/BDB/BDB.pm
(Generate patch)

Comparing BDB/BDB.pm (file contents):
Revision 1.56 by root, Fri Jan 9 22:32:12 2009 UTC vs.
Revision 1.66 by root, Fri Apr 11 04:25:57 2014 UTC

27 db_sync $db; 27 db_sync $db;
28 28
29 # when you also use Coro, management is easy: 29 # when you also use Coro, management is easy:
30 use Coro::BDB; 30 use Coro::BDB;
31 31
32 # automatic event loop intergration with AnyEvent: 32 # automatic event loop integration with AnyEvent:
33 use AnyEvent::BDB; 33 use AnyEvent::BDB;
34 34
35 # automatic result processing with EV: 35 # automatic result processing with EV:
36 my $WATCHER = EV::io BDB::poll_fileno, EV::READ, \&BDB::poll_cb; 36 my $WATCHER = EV::io BDB::poll_fileno, EV::READ, \&BDB::poll_cb;
37 37
103 103
104=cut 104=cut
105 105
106package BDB; 106package BDB;
107 107
108no warnings; 108use common::sense;
109use strict 'vars';
110 109
111use base 'Exporter'; 110use base 'Exporter';
112 111
113our $VERSION; 112our $VERSION;
114 113
115BEGIN { 114BEGIN {
116 $VERSION = '1.83'; 115 $VERSION = '1.91';
117 116
118 our @BDB_REQ = qw( 117 our @BDB_REQ = qw(
119 db_env_open db_env_close db_env_txn_checkpoint db_env_lock_detect 118 db_env_open db_env_close db_env_txn_checkpoint db_env_lock_detect
120 db_env_memp_sync db_env_memp_trickle db_env_dbrename db_env_dbremove 119 db_env_memp_sync db_env_memp_trickle db_env_dbrename db_env_dbremove
121 db_env_log_archive 120 db_env_log_archive
772 771
773=head2 Unexpected Crashes 772=head2 Unexpected Crashes
774 773
775Remember that, by default, BDB will execute requests in parallel, in 774Remember that, by default, BDB will execute requests in parallel, in
776somewhat random order. That means that it is easy to run a C<db_get> 775somewhat random order. That means that it is easy to run a C<db_get>
777request on thesa me database as a concurrent C<db_close> request, leading 776request on the same database as a concurrent C<db_close> request, leading
778to a crash, silent data corruption, eventually the next world war on 777to a crash, silent data corruption, eventually the next world war on
779terrorism. 778terrorism.
780 779
781If you only ever use foreground requests (without a callback), this will 780If you only ever use foreground requests (without a callback), this will
782not be an issue. 781not be an issue (unless you use threads).
783 782
784=head2 Unexpected Freezes or Deadlocks 783=head2 Unexpected Freezes or Deadlocks
785 784
786Remember that, by default, BDB will execute requests in parallel, which 785Remember that, by default, BDB will execute requests in parallel, which
787easily leads to deadlocks (even concurrent put's on the same database can 786easily leads to deadlocks (even concurrent put's on the same database can

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines