Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-6871

stale=false including recently deleted items

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 2.0
    • None
    • None
    • Security Level: Public
    • None

    Description

      stale=false doesn't work as advertised.

      function testBasicView() {
      $oo = $this->getPersistOO();

      $ary = array(
      "testid__" => "php"
      );

      $key = $this->mk_key();

      $oo->set($key, json_encode($ary));

      $rows = $oo->view(COUCHBASE_TEST_DESIGN_DOC_NAME,
      COUCHBASE_TEST_VIEW_NAME,
      array("stale" => "false",
      "foo" => "bar"));

      $this->assertArrayHasKey('rows', $rows);
      $this->assertArrayHasKey('total_rows', $rows);
      $rows = $rows['rows'];
      foreach ($rows as $row)

      { $id = $row['id']; $ret = $oo->get($id); $this->assertNotNull($ret); $rv = $this->getPersistOO()->delete($id); }

      $this->assertNull($oo->get($key));
      $this->assertEquals(COUCHBASE_KEY_ENOENT, $oo->getResultCode());

      $rows = $oo->view(COUCHBASE_TEST_DESIGN_DOC_NAME,
      COUCHBASE_TEST_VIEW_NAME,
      array("stale" => "false"));
      }

      reproducible example in php tests (ViewSimple.inc)..

      TODO: fil this out..

      This is not a client bug and I've verified that stale=false is being passed as a parameter. Furthermore, only some recently deleted items are present.. some are gone.

      This doesn't always fail..

      Attachments

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

        Activity

          People

            mccouch MC Brown (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