Exemplo n.º 1
0
/**
********************************************************************************
** \brief
**   save a key/value into the ark db
*******************************************************************************/
void kv_async_DEL_KEY(async_CB_t *pCB)
{
    uint32_t rc=0;
    pCB->tag = pCB->itag + pCB->len_i;

    while (EAGAIN == (rc=ark_del_async_cb(pCB->ark,
                                          pCB->db->klen,
                                          pCB->db->kv[pCB->len_i].key,
                                          kv_async_cb,
                                          pCB->tag))) usleep(10000);
    if (rc) KV_ERR_STOP(pCB,"DEL_KEY",rc);
}
Exemplo n.º 2
0
/**
 *******************************************************************************
 * \brief
 ******************************************************************************/
static void kv_async_DEL_KEY(async_CB_t *pCB)
{
    uint64_t tag = (uint64_t)pCB;
    int32_t  rc  = 0;

    KV_TRC_DBG(pFT, "DEL_KEY: %p, %" PRIx64 "", pCB, tag);

    pCB->tag = tag;

    rc = ark_del_async_cb(pCB->ark,
                          pCB->db[pCB->len_i].klen,
                          pCB->db[pCB->len_i].key,
                          pCB->cb,
                          tag);
    if (EAGAIN == rc)
    {
        kv_async_q_retry(pCB);
    }
    else
    {
        EXPECT_EQ(0, rc);
    }
}