synchronization bug in 1.0.16 version

Bug #1201300 reported by Tarun Chabarwal
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

I'm using php with memcached 2.1, libmemcached 1.0.16 and memcache server 1.4

I wrote the following script, which results in some key persistance

class mem{
        public $mem = null;
        public static $x = 0;

        public function __construct()
                $this->mem = new Memcached();
                $op = $this->mem->add("key_".self::$x, "test");
        public function __destruct()
                $op = $this->mem->delete("key_".self::$x);
                $this->mem = null;
$v = new mem();

When this script runs, I found that 5-10 keys were not being deleted and when i run the same script with memcached 2.0, libmemcached 0.48, keeping the same memcache server every key is deleted.
Moreover when i use concurrent execution of the same script, the key persistance number grows exponentially.

I watched the memcached library code but didn't find much difference. I think it has to do some with libmemcached....

Please give me some explanation for this behavior

Tags: php
Revision history for this message
Tarun Chabarwal (tarunchabarwal) wrote :

I used php 5.4

description: updated
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.