Sven C. Koehler
4/5/2009 1:09:00 PM
Ok, thanks to everyone who reported bugs!
I think I fixed this problem, so could anyone who had problems setting
keys run the following command to verify whether it works better now?
% git clone git://github.com/sck/localmemcache.git && cd localmemcache && rake sanity_test
The output at the end should look like this:
| LocalMemCache
| - should allow to set and query keys
| - should support the [] and []= operators
| - should allow deletion of keys
| - should return a list of keys
| - should support \0 in values and keys
| - should throw exception if pool is full
| - should support checking of namespaces
| - should support clearing of namespaces
|
| 8 specifications (8 requirements), 0 failures, 0 errors
(I haven't fixed the close bug yet.)
Best,
Sven
On Sun, Apr 05, 2009 at 07:09:56AM +0900, Matthias Reitinger wrote:
> On Sat, 04 Apr 2009 12:59:56 -0500, Sven C. Koehler wrote:
> > This is how it looks on my machine:
>
> I can reproduce the issue Michael and Rados??aw are having:
>
> reima@marvin:~$ uname -a
> Linux marvin 2.6.27-11-generic #1 SMP Thu Jan 29 19:24:39 UTC 2009 i686
> GNU/Linux
> reima@marvin:~$ ruby -v
> ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
> reima@marvin:~$ irb
> >> require 'localmemcache'
> => true
> >> $lm = LocalMemCache.new :namespace => "viewcounters"
> => #<LocalMemCache:0xb7b69bdc>
> >> $lm.keys
> => []
> >> $lm[:foo]
> => nil
> >> $lm[:foo] = 1
> => 1
> >> $lm[:foo]
> => nil
> >> $lm.keys
> => ["foo"]
> >> puts `du -h /var/tmp/localmemcache/viewcounters.lmc`
> 16K /var/tmp/localmemcache/viewcounters.lmc
> => nil
> >>
>
> And on a sidenote:
>
> reima@marvin:~$ irb
> >> require 'localmemcache'
> => true
> >> $lm = LocalMemCache.new :namespace => "viewcounters"
> => #<LocalMemCache:0xb79eac20>
> >> $lm.close
> => nil
> >> $lm.keys
> (irb):4: [BUG] Segmentation fault
> ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
>
> Aborted
> reima@marvin:~$
>
> -Matthias