[Kai-users-ja] DELETEの挙動について
Kai is a distributed key-value datastore
Status: Beta
Brought to you by:
takemaru
From: Tomoya H. <tom...@gm...> - 2008-12-03 07:53:40
|
橋本です。 deleteの挙動について質問です。 memcachedのプロトコル仕様書ではdeleteは以下のように定義されています。 delete <key> [<time>] [noreply]\r\n ですが、kaiにこの様式で送るとコネクションを切られます。 [t-hashi@gtp301 work]$ telnet gtp205 11211 Trying 172.20.31.205... Connected to gtp205 (172.20.31.205). Escape character is '^]'. set hoge 0 0 10 0123456789 STORED get hoge VALUE hoge 0 10 0123456789 END delete hoge 0 <- ここ Connection closed by foreign host. [t-hashi@gtp301 work]$ timeをつけると問答無用で切断されます。timeをつけないと期待通りに動きます。 [t-hashi@gtp301 work]$ telnet gtp205 11211 Trying 172.20.31.205... Connected to gtp205 (172.20.31.205). Escape character is '^]'. set hoge 0 0 10 0123456789 STORED get hoge VALUE hoge 0 10 0123456789 END delete hoge DELETED get hoge END quit Connection closed by foreign host. PHPでサンプルコードを書くとdeleteができないように見えて発見しました。tcpdumpしてみるとPHPのmemcachedクライアントは timeをつけて送信していました。結果的にPHPからdeleteを送った後は予期しない動きになってしまします。 |