[patch] specify entries not subject to LRU at write time

Brad Fitzpatrick brad at danga.com
Wed Jun 11 05:29:46 UTC 2008


Finally replying to this now, because somebody just referenced it and I see
nobody else has replied.

Some comments:

* include your patch inline or post a link to it that's easy to see in a
browser.  you'll get more feedback.

* a tarball's the wrong format.  just post a unified diff (diff -u)

* we don't about diffs to auto-generated files like configure scripts.  just
the source.

* #ifdefs all over source code are ugly

* please follow local style.  that is, look at code around you and make your
new code look like existing code.

* magic exptime value?  magic values are gross.  don't we have flag bits
left?

* what happens when one LRU-locked amidst thousands of non-LRU-locked items
gets to the tail of the queue?  are we locked forever.  do you promote the
LRU-locked one to the head?

etc


On Sun, Mar 25, 2007 at 8:18 PM, Paul G <paul-lists at perforge.com> wrote:

> folks,
>
> i've put together a small patch (in fact, most of it is autoconf stuff) to
> allow writing 'permanent' items which won't be subject to LRU replacement.
> this is useful (i think) if you want to guarantee that some data survives
> either until its expiration or until the server/machine it's on dies. while
> this is obviously doable with the appropriate command line switch, this
> patch allows it to be specified on a per item basis and changed at any time,
> meaning you can store them in the same memory pressured memcached instance
> you're hammering with everything else.
>
> testing and comments from memcached hackers wrt what i've subtly broken
> with this  would be most welcome. please note, while it works in my tests
> (such as they are), i *don't* guarantee that it won't eat your children or
> sleep with your wife ;)
>
> usage:
>  apply diff, autoconf + autoheader, then
> ./configure --enable-perm-items
>
> (i've tried to make it as simple to try out as possible, admittedly so i
> can get some testing and comments on it).
>
>
> for other options and a few short notes on the why/what/how, check the
> included README.
>
> you can grab it here:
> http://www.perforge.com/permitems-patch-memcached-1.2.1.tgz
>
> cheers,
> -p
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20080610/86c4207b/attachment.htm 


More information about the memcached mailing list