From: rkinyon@cpan.org Date: Thu, 26 Jun 2008 19:05:18 +0000 (+0000) Subject: Flushing problems fixed X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d451590fa2f8cd39f6b553cab5237bbfdad6e812;p=dbsrgits%2FDBM-Deep.git Flushing problems fixed git-svn-id: http://svn.ali.as/cpan/trunk/DBM-Deep@3643 88f4d9cd-8a04-0410-9d60-8f63309c3137 --- diff --git a/lib/DBM/Deep.pm b/lib/DBM/Deep.pm index 56ecc0c..be32a02 100644 --- a/lib/DBM/Deep.pm +++ b/lib/DBM/Deep.pm @@ -610,6 +610,7 @@ sub delete { (shift)->DELETE( @_ ) } sub exists { (shift)->EXISTS( @_ ) } sub clear { (shift)->CLEAR( @_ ) } +sub flush {shift->_get_self->_engine->flush;} sub _dump_file {shift->_get_self->_engine->_dump_file;} 1; diff --git a/lib/DBM/Deep/Engine.pm b/lib/DBM/Deep/Engine.pm index 6524561..8f172b3 100644 --- a/lib/DBM/Deep/Engine.pm +++ b/lib/DBM/Deep/Engine.pm @@ -754,6 +754,10 @@ sub flush { $self->storage->print_at( $offset, $self->sector_cache->{$offset} ); } + # Why do we need to have the storage flush? Shouldn't autoflush take care of things? + # -RobK, 2008-06-26 + $self->storage->flush; + $self->clear_dirty_sectors; $self->clear_sector_cache;