[PCBC-128] Multi-touch causes inconsistent zend hash error Created: 01/Oct/12  Updated: 08/Oct/12  Resolved: 08/Oct/12

Status: Resolved
Project: Couchbase PHP client library
Component/s: library
Affects Version/s: 1.1.0-dp5
Fix Version/s: 1.1.0-dp5
Security Level: Public

Type: Bug Priority: Major
Reporter: Michael Jackson Assignee: Michael Jackson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
The multiple-keys version of the touch operation (e.g. touchMulti() method of a Couchbase instance) causes an error to be reported about a hash being inconsistent, e.g. /home/orion/couchbase/php-5.3.15/Zend/zend_hash.c(520) : ht=0xaef9c24 is inconsistent
(paths and memory locations would vary).

The current return value scheme for multi-touch is that a hash is made in the initial php_couchbase_touch_impl function that maps all given keys to false, and then in the php_couchbase_touch_callback function as each key is seen, its value is updated to true. When the hash update block is commented out, this error is not reproduced, so it seems there is some issue within that code that causes this to happen. Notably it happens both with the raw key value (as retrieved from the response) and with effort taken to make sure that the key is nul-terminated (as in some other callback functions).

 Comments   
Comment by Michael Jackson [ 04/Oct/12 ]
http://review.couchbase.org/#/c/21349/1 contains the fix for this
Comment by Michael Jackson [ 08/Oct/12 ]
merged to master
Generated at Thu Sep 18 22:33:08 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.