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

[ARRAY RQG] query returning extra results that are missing the requested field

    XMLWordPrintable

    Details

    • Triage:
      Untriaged
    • Is this a Regression?:
      Unknown

      Description

      I have a cluster with a kv,n1ql,index node and a kv,analytics node

      default bucket with data set defined by a yaml file and 50k docs
      dataverse called default

      CREATE INDEX `adv_type` ON `default`(`type`)

      SELECT id, owner, type FROM `default` WHERE EVERY p IN idents.accts.profids SATISFIES p.type = "shopfc" END AND type = 'links' ORDER BY id DESC, owner, type DESC

      analytics query:
      SELECT idents.accts FROM `default` d WHERE (EVERY p IN d.idents.accts.profids SATISFIES p.`type` = "shopfc" END) AND `type` = 'links' ORDER BY id DESC, owner, `type` DESC

      n1ql query returns 195 results

      matching analytics query returns 3598 results

      Logs and backups attached

      backup: https://www.dropbox.com/s/dcrfil3ne6volww/analyticsbug.tar.gz?dl=0

      However the analytics query is returns documents that DON'T match the criteria:

      looking at the accts field of these documents we see that most of the returned results do not even contain the profids field.

      {
      "accts": {
      "mems": [

      { "memid": 264, "progid": "VW", "validated": true }

      ]
      }
      }

        Attachments

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

          Activity

          ajay.bhullar Ajay Bhullar created issue -
          till Till Westmann made changes -
          Field Original Value New Value
          Assignee Till Westmann [ till ] Dmitry Lychagin [ dmitry.lychagin ]
          till Till Westmann made changes -
          Labels triaged
          dmitry.lychagin Dmitry Lychagin made changes -
          Summary [ARRAY RQG][Analytics] analytics query returning extra results that are missing the requested field [ARRAY RQG] query returning extra results that are missing the requested field
          dmitry.lychagin Dmitry Lychagin made changes -
          Comment [ Universal quantification (EVERY ... SATISFIERS ...) over an empty set always returns 'true'.

          [https://en.wikipedia.org/wiki/Universal_quantification#The_empty_set]

          So the documents that have no 'profids' field should be included in the result. ]
          ritam.sharma Ritam Sharma made changes -
          Priority Major [ 3 ] Critical [ 2 ]
          till Till Westmann made changes -
          Rank Ranked higher
          lynn.straus Lynn Straus made changes -
          Fix Version/s Mad-Hatter [ 15037 ]
          Fix Version/s Cheshire-Cat [ 15915 ]
          lynn.straus Lynn Straus made changes -
          Labels triaged deferred-from-Mad-Hatter releasenote triaged
          till Till Westmann made changes -
          Rank Ranked higher
          till Till Westmann made changes -
          Rank Ranked higher
          till Till Westmann made changes -
          Rank Ranked higher
          till Till Westmann made changes -
          Rank Ranked higher
          till Till Westmann made changes -
          Rank Ranked higher
          till Till Westmann made changes -
          Rank Ranked higher
          till Till Westmann made changes -
          Rank Ranked higher
          till Till Westmann made changes -
          Rank Ranked higher
          till Till Westmann made changes -
          Rank Ranked higher
          till Till Westmann made changes -
          Rank Ranked higher
          till Till Westmann made changes -
          Rank Ranked lower
          till Till Westmann made changes -
          Rank Ranked higher
          till Till Westmann made changes -
          Fix Version/s Cheshire-Cat [ 15915 ]
          Fix Version/s CheshireCat.Next [ 16908 ]
          Priority Critical [ 2 ] Major [ 3 ]
          till Till Westmann made changes -
          Fix Version/s CheshireCat.Next [ 16908 ]
          Fix Version/s Morpheus [ 17651 ]

            People

            Assignee:
            dmitry.lychagin Dmitry Lychagin
            Reporter:
            ajay.bhullar Ajay Bhullar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes

                  PagerDuty