in reply to Re^2: Storable - File empties itself?
in thread Storable - File empties itself?
>> Firstly it is not using locking Yeah, that's right. Might this be an issue? I've never worked with this Module before.
I rarely use Storable directly myself but yes it might well be an issue. I don't know the details of how Storable performs its I/O deep down but any time you might have two processes performing simultaneous I/O on the same file there is the possibility of catastrophic corruption. The very fact that the module offers functions like lock_store and lock_retrieve suggests that their use might be necessary on occasion.
just read in the documentation "The routine returns undef for I/O problems or other internal error, a true value otherwise. Serious errors are propagated as a die exception." so I'll add proper error checking now.
That seems like a worthwile action for sure.
Apache-Overview states Storable Version 2.56
I don't see that version listed anywhere but the 3.x releases started coming out in 2016 so you have a version which is quite old. It is at least worth bearing that in mind when reading newer documentation.
🦛
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Storable - File empties itself?
by feumw (Sexton) on Apr 13, 2023 at 11:47 UTC | |
by eyepopslikeamosquito (Archbishop) on Apr 14, 2023 at 09:19 UTC | |
by feumw (Sexton) on Apr 18, 2023 at 06:34 UTC | |
by haukex (Archbishop) on Apr 14, 2023 at 07:22 UTC |