Hello,
DW>I would also suggest using BerkeleyDB.pm, but with the
DW>DB_INIT_MPOOL|DB_INIT_CDB flags. In this mode, only one writer is
DW>allowed at a time, and Berkeley automatically handles all the locking
DW>and flushing. Just don't forget to use db_close() to close the file
DW>before untie
I would also suggest using BerkeleyDB.pm, but with the
DB_INIT_MPOOL|DB_INIT_CDB flags. In this mode, only one writer is
allowed at a time, and Berkeley automatically handles all the locking
and flushing. Just don't forget to use db_close() to close the file
before untie'ing it.
Dan Wilga
> > Isn't that just as simple as
> >
> > tied(%dbm_array)->sync();
>
> I believe that's not enough, because the reader may read data during
the
> write, resulting in corrupted data read.
Not only that, there's also the issue with at least some dbm
implementations that they cache part of the file
Stas Bekman wrote:
>
> > tied(%dbm_array)->sync();
>
> I believe that's not enough, because the reader may read data during the
> write, resulting in corrupted data read. You have to add locking. see
> the DBM chapter in the guide.
>
You might add MLDBM::Sync to the docs, which easily adds loc
Rob Bloodgood wrote:
>>So my question narrows down to :
>>How to flush on disk the cache of a tied DBM (DB_File) structure
>>in a way that any concurrent process accessing it in *read only* mode
>>would automatically get the new values as soon as they
>>are published (synchronisation)
>>
>
> Isn'
> So my question narrows down to :
> How to flush on disk the cache of a tied DBM (DB_File) structure
> in a way that any concurrent process accessing it in *read only* mode
> would automatically get the new values as soon as they
> are published (synchronisation)
Isn't that just as simple as
ti
Franck PORCHER wrote:
> So my question narrows down to :
> How to flush on disk the cache of a tied DBM (DB_File) structure
> in a way that any concurrent process accessing it in *read only* mode
> would automatically get the new values as soon as they
> are published (synchronisation)
You have t
Hi there,
I have a quick and possibly trivial question that has bothered me
for quite a while.
I'm using a DBM as a repository. The DBM is constantly written to by only one
process (the 'writer') that opens it RW. At the same time, many process (the 'reader')
access it *read only*.
I experience