synchronization bug in 1.0.16 version

Bug #1201300 reported by Tarun Chabarwal on 2013-07-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libmemcached
Undecided
Unassigned

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

<?php
class mem{
        public $mem = null;
        public static $x = 0;

        public function __construct()
        {
                $this->mem = new Memcached();
                $this->mem->addServer("localhost",11211);
                $op = $this->mem->add("key_".self::$x, "test");
        }
        public function __destruct()
        {
                $op = $this->mem->delete("key_".self::$x);
                $this->mem = null;
                self::$x++;
        }
}
for($i=0;$i<100000;$i++){
$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 Edit Tag help

I used php 5.4

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

Other bug subscribers