将文档重新添加到Couchbase Server 2.0.1失败

我在运行版本2.0.1社区版(build-170-rel)的Couchbase集群上遇到了奇怪的行为。

通过PHP-lib我执行以下代码:</ p>

  $ json = json_encode(array('hello'=&gt;'world  ')); 
$的CB-&gt;添加(' test123' ,$ JSON);
$的CB-&GT;删除( 'test123');
$的CB-&gt;添加( 'test123',$ JSON );
</ code> </ pre>

文档应该在服务器上,但是查询不会通过PHP或Web控制台返回任何结果。 但令人惊讶的是,密钥确实出现在“TOP KEYS”部分下。</ p>

但是当我使用set命令而不是add时,执行上述代码后文档就存在了。 / p>

您对发生的事情有什么想法吗? 对我来说,似乎在删除文档时没有释放密钥。</ p>

有没有机会摆脱“孤立”键下出现的“孤儿”键?
谢谢 很多你的调查。</ p>

干杯,
Chris </ p>
</ div>

展开原文

原文

I experienced a weird behaviour on my Couchbase cluster running version 2.0.1 community edition (build-170-rel). Through PHP-lib I execute the following code:

$json = json_encode(array('hello' => 'world'));
$cb->add('test123',$json);
$cb->delete('test123');
$cb->add('test123',$json);

The document should be on server, but querying does not return any result, neither via PHP nor via web console. But surprisingly, the key does appear under "TOP KEYS" section from time to time.

But when I use the set command instead of add, the documents exists after executing the above code.

Do you have any ideas on what is going on? For me it seems that keys are not freed on document deletion.

Is there any chance to get rid of "orphaned" keys, which are showing up under "TOP KEYS"? Thanks a lot for your investigation.

Cheers, Chris

1个回答



我已经在我的环境中测试过没有任何问题(文档存储在控制台和代码中都可以访问)</ p>

您可以打印正在执行的每个操作返回的值/代码吗?</ p>
</ div>

展开原文

原文

I have tested on my environment without any issue (the document is stored and accessible in the console and from the code)

Can you print the value/code returned by each operation you are executing?

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐