C API - meaning of function return codes for bulk operations


#1

There are many functions in libcouchbase that take an array of commands (e.g. lcb_get, lcb_store) and return a single lcb_error_t. It’s not clear to me what this return value represents. For example, what if I lcb_get 100 keys and trigger both an LCB_KEY_ENOENT and an LCB_ENOMEM? Also, when would you rely on this error code as opposed to the one you get in the callbacks?


#2

the operation itself just schedule the command by building a packet and copying it into internal buffers. therefore you will get the status of this action, but actual response status comes in the callback along with the response value. this allows you to receive status for rack command separately


#3

Thanks for the answer. Which errors should I expect to handle for this?