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

More than one key sargable, but first key generates empty span it panics

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • Yes

    Description

       create index ix1 ON default(DISTINCT ARRAY v.id FOR v IN arr1 END, c1);
      EXPLAIN SELECT 1 FROM default WHERE ANY v IN arr1 SATISFIES v.id IN [] END AND c1 = 5;
      
      

      2021-09-21T17:12:36.138-07:00 [SEVERE] request text: <ud>EXPLAIN SELECT 1 FROM default WHERE ANY v IN arr1 SATISFIES v.id IN [] END AND c1 = 5;</ud>
      2021-09-21T17:12:36.138-07:00 [SEVERE] query context: <ud></ud>
      2021-09-21T17:12:36.138-07:00 [SEVERE] stack: goroutine 350 [running]:
      github.com/couchbase/query/server.(*Server).serviceRequest.func1(0x5ba83c0, 0xc000d16000, 0xc0005f0000)
      	/Users/sitaram/trans/query/src/github.com/couchbase/query/server/server.go:924 +0xbe
      panic(0x5687860, 0xc00117e1e0)
      	/usr/local/Cellar/go/1.13.7/libexec/src/runtime/panic.go:679 +0x1b2
      github.com/couchbase/query/planner.SargForFilters(0xc000c05ab0, 0x2, 0x2, 0xc001133020, 0x2, 0x2, 0x2, 0xa800000, 0xc000aea0c0, 0xc0011629f0, ...)
      	/Users/sitaram/trans/query/src/github.com/couchbase/query/planner/sarg.go:115 +0xa8c
      github.com/couchbase/query/planner.(*builder).sargIndexes(0xc001166000, 0xc000aea0c0, 0xc001178f00, 0xc001178f28, 0x6d77260, 0xc001178b00)
      	/Users/sitaram/trans/query/src/github.com/couchbase/query/planner/build_scan_secondary.go:673 +0x769
      github.com/couchbase/query/planner.(*builder).buildCoveringScan(0xc001166000, 0xc001163380, 0xc001128300, 0xc000aea0c0, 0x5b72fa0, 0xc000578f50, 0x0, 0x0, 0x0, 0x0, ...)
      	/Users/sitaram/trans/query/src/github.com/couchbase/query/planner/build_scan_covering.go:102 +0xa75
      github.com/couchbase/query/planner.(*builder).buildCovering(0xc001166000, 0xc001163380, 0x0, 0xc001128300, 0xc000aea0c0, 0x5b72fa0, 0xc000578f50, 0x0, 0x0, 0x0, ...)
      	/Users/sitaram/trans/query/src/github.com/couchbase/query/planner/build_scan_covering.go:36 +0x104
      github.com/couchbase/query/planner.(*builder).buildSecondaryScan(0xc001166000, 0xc001163380, 0x0, 0xc001128300, 0xc000aea0c0, 0x5b72fa0, 0xc000578f50, 0x0, 0x0, 0x0, ...)
      	/Users/sitaram/trans/query/src/github.com/couchbase/query/planner/build_scan_secondary.go:29 +0xb8
      github.com/couchbase/query/planner.(*builder).buildTermScan(0xc001166000, 0xc001128300, 0xc000aea0c0, 0x5b72fa0, 0xc000578f50, 0xc0011c8000, 0x5, 0x100, 0xc000c05b60, 0x1, ...)
      	/Users/sitaram/trans/query/src/github.com/couchbase/query/planner/build_scan.go:407 +0x69d
      github.com/couchbase/query/planner.(*builder).buildSubsetScan(0xc001166000, 0x5b57b40, 0xc000c7cf70, 0xc001128300, 0xc000aea0c0, 0x5b72fa0, 0xc000578f50, 0xc0011c8000, 0x5, 0x100, ...)
      

      Attachments

        Issue Links

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

          Activity

            Sitaram.Vemulapalli Sitaram Vemulapalli created issue -
            Sitaram.Vemulapalli Sitaram Vemulapalli made changes -
            Field Original Value New Value
            Link This issue is triggered by CBSE-10755 [ CBSE-10755 ]
            bingjie.miao Bingjie Miao made changes -
            Assignee Kamini Jagtiani [ kamini.jagtiani ] Bingjie Miao [ bingjie.miao ]
            Sitaram.Vemulapalli Sitaram Vemulapalli made changes -
            Summary panic is the planner When more than one key sargable, but first key generates empty span it panics
            Sitaram.Vemulapalli Sitaram Vemulapalli made changes -
            Summary When more than one key sargable, but first key generates empty span it panics More than one key sargable, but first key generates empty span it panics
            Sitaram.Vemulapalli Sitaram Vemulapalli made changes -
            Affects Version/s 7.0.2 [ 18012 ]
            Sitaram.Vemulapalli Sitaram Vemulapalli made changes -
            Fix Version/s 7.0.3 [ 18033 ]
            Fix Version/s 6.6.4 [ 17614 ]
            bingjie.miao Bingjie Miao made changes -
            Is this a Regression? Unknown [ 10452 ] Yes [ 10450 ]
            bingjie.miao Bingjie Miao made changes -
            Link This issue is caused by MB-30422 [ MB-30422 ]
            kamini.jagtiani Kamini Jagtiani (Inactive) made changes -
            Fix Version/s 7.0.2 [ 18012 ]
            Fix Version/s 7.0.3 [ 18033 ]
            wayne Wayne Siu made changes -
            Link This issue blocks MB-46308 [ MB-46308 ]
            wayne Wayne Siu made changes -
            Labels approved-for-7.0.2
            wayne Wayne Siu made changes -
            Link This issue blocks MB-47673 [ MB-47673 ]
            wayne Wayne Siu made changes -
            Labels approved-for-7.0.2 approved-for-6.6.4 approved-for-7.0.2
            bingjie.miao Bingjie Miao made changes -
            Assignee Bingjie Miao [ bingjie.miao ] Mihir Kamdar [ mihir.kamdar ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            mihir.kamdar Mihir Kamdar (Inactive) made changes -
            Assignee Mihir Kamdar [ mihir.kamdar ] Pierre Regazzoni [ JIRAUSER25157 ]
            pierre.regazzoni Pierre Regazzoni made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            wayne Wayne Siu made changes -
            Link This issue blocks MB-49253 [ MB-49253 ]
            wayne Wayne Siu made changes -
            Link This issue blocks MB-50048 [ MB-50048 ]
            wayne Wayne Siu made changes -
            Link This issue blocks MB-50049 [ MB-50049 ]
            wayne Wayne Siu made changes -
            Fix Version/s 6.6.4 [ 18218 ]

            People

              pierre.regazzoni Pierre Regazzoni
              Sitaram.Vemulapalli Sitaram Vemulapalli
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                PagerDuty