Re-adding documents fails

Hi folks,
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 when running XDCR.
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 Answer

« Back to question.

Hello
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?
Regards