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

N1QL returns duplicate results

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • 5.1.0
    • query
    • Untriaged
    • Windows 64-bit
    • Unknown

    Description

      N1QL returns duplicate results for one entry

      example query:

       SELECT `Extent1`.* FROM `binyat` as `Extent1` 
       WHERE ((`Extent1`.`docType` = 'StockRevisionLine') 
       AND (`Extent1`.`stockRevisionId` = '15b4ef08-1bfb-4294-b154-d15535a1ce10') 
       AND (`Extent1`.`id` = '0911ad98-a24b-402b-bd0a-ad3e03e0075e')) 
      


      and its results:

      [ 
       { 
        "date": "2018-04-12T14:30:52.2843225+05:00", 
        "docType": "StockRevisionLine", 
        "id": "0911ad98-a24b-402b-bd0a-ad3e03e0075e", 
        ... 
       }, 
       { 
        "date": "2018-04-12T14:30:52.2843225+05:00", 
        "docType": "StockRevisionLine", 
        "id": "0911ad98-a24b-402b-bd0a-ad3e03e0075e", 
        ... 
       } 

       

       

      If I query by key, I get only one result.

      After I deleted this document, N1QL still returns one result, but querying by key returns no result.

      This started to happen on several documents.

      I think this is some how related to replication, where conflicted and deleted documents still kept somewhere, and GSI scans them also.

      Please let me know if additional information is needed to investigate this issue.

      Attachments

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

        Activity

          People

            keshav Keshav Murthy
            mgochmuradov merdan gochmuradov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty