Uploaded image for project: 'Couchbase C client library libcouchbase'
  1. Couchbase C client library libcouchbase
  2. CCBC-664

Make enter/leave calls optional for API3

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 2.5.6
    • None
    • library
    • Security Level: Public
    • None

    Description

      This makes the usage of `lcb_sched_enter()` and `lcb_sched_leave()` optional. These APIs are there mainly to support the 'all-or-nothing' scheduling semantics of the V2 API and the Python SDK, both of which support so-called "multi" operations.

      Upon the advice of Brett Lawson, the behavior has now been extended so that when an operation is added to the pending/spooling queue, it will be transferred to the request queue if a previous call to `lcb_sched_enter()` is not active. If a current call to `lcb_sched_enter()` is active then the request is only placed in the queue when `lcb_sched_leave()` is called.

      This allows simple idioms like

      lcb_CMDGET gcmd = { 0 };
      LCB_CMD_SET_KEY(&gcmd, "key", 3);
      lcb_get3(instance, NULL, &gcmd);
      lcb_wait(instance);
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mnunberg Mark Nunberg (Inactive)
            mnunberg Mark Nunberg (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty