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

Tuq-server behaviour on memcached buckets

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: cbq-alpha
    • Component/s: query
    • Security Level: Public
    • Labels:
      None

      Description

      What should the expected behaviour for memcached buckets querying against tuq be?

      • For simpler "Select *" queries, I get a "Bucket not found" error
      • For Count queries, the server crashes
      • For System.Catalog - it detects this as a part of the system

      1. Select * from mem

      tuq> select * from mem - Bucket Not Found, okay for now.
      {
      "error":

      { "caller": "view_index:195", "code": 5000, "key": "Internal Error", "message": "Bucket mem not found." }

      }

      2. But this bucket is detected via System.Catalog

      tuq> SELECT * FROM :system.buckets
      {
      "resultset": [

      { "id": "mem", "name": "mem", "pool_id": "default", "site_id": "http://guinep-s10502.sc.couchbase.com:8091" }

      ],
      "info": [

      { "caller": "http_response:152", "code": 100, "key": "total_rows", "message": "1" }

      ,

      { "caller": "http_response:154", "code": 101, "key": "total_elapsed_time", "message": "56.42739ms" }

      ]
      }

      3. Select COUNT crashes the tuq-server

      tuq> select count from mem
      {
      "error":

      { "caller": "fast_count:128", "code": 5000, "key": "Internal Error", "message": "Panic In Exeuction Pipeline" }

      }

      tuq-server output

      Ketakis-MacBook-Pro:tuqtng ketaki$ ./tuqtng -couchbase http://guinep-s10502.sc.couchbase.com:8091
      12:10:12.997377 tuqtng started...
      12:10:12.997530 version: 0.0.0
      12:10:12.997539 site: http://guinep-s10502.sc.couchbase.com:8091
      12:10:23.617768 ERROR: View Walking Panic: runtime error: invalid memory address or nil pointer dereference
      /Users/ketaki/gocode/src/github.com/couchbaselabs/tuqtng/catalog/couchbase/view_util.go:65 (0x18cc9c)
      com/couchbaselabs/tuqtng/catalog/couchbase.func.001: clog.Error(fmt.Errorf("View Walking Panic: %v\n%s", r, debug.Stack()))
      /usr/local/go/src/pkg/runtime/panic.c:229 (0x16051)
      /usr/local/go/src/pkg/runtime/panic.c:487 (0x167f3)
      /usr/local/go/src/pkg/runtime/os_darwin.c:462 (0x15748)
      /usr/local/go/src/pkg/net/url/url.go:645 (0xe067e)
      /usr/local/go/src/pkg/net/url/url.go:633 (0xe05ff)
      /Users/ketaki/gocode/src/github.com/couchbaselabs/go-couchbase/util.go:43 (0x23486f)
      com/couchbaselabs/go-couchbase.ParseURL: url, err = url.Parse(urlStr)
      /Users/ketaki/gocode/src/github.com/couchbaselabs/go-couchbase/views.go:39 (0x234ca3)
      com/couchbaselabs/go-couchbase.(*Bucket).randomBaseURL: u, err := ParseURL(node.CouchAPIBase)
      /Users/ketaki/gocode/src/github.com/couchbaselabs/go-couchbase/views.go:62 (0x234f08)
      com/couchbaselabs/go-couchbase.(*Bucket).ViewURL: u, err := b.randomBaseURL()
      /Users/ketaki/gocode/src/github.com/couchbaselabs/tuqtng/catalog/couchbase/view_util.go:76 (0x18ab53)
      com/couchbaselabs/tuqtng/catalog/couchbase.WalkViewInBatches: logURL, err := bucket.ViewURL(ddoc, view, options)
      /usr/local/go/src/pkg/runtime/proc.c:1223 (0x19bb0)
      – couchbase.funcĀ·001() at view_util.go:65
      12:11:14.273754 ERROR: Query Execution Panic: runtime error: invalid memory address or nil pointer dereference
      /Users/ketaki/gocode/src/github.com/couchbaselabs/tuqtng/xpipeline/fast_count.go:127 (0x2a19e3)
      com/couchbaselabs/tuqtng/xpipeline.(*FastCount).RecoverPanic: clog.Error(fmt.Errorf("Query Execution Panic: %v\n%s", r, debug.Stack()))
      /usr/local/go/src/pkg/runtime/panic.c:229 (0x16051)
      /usr/local/go/src/pkg/runtime/panic.c:487 (0x167f3)
      /usr/local/go/src/pkg/runtime/os_darwin.c:462 (0x15748)
      /usr/local/go/src/pkg/net/url/url.go:645 (0xe067e)
      /usr/local/go/src/pkg/net/url/url.go:633 (0xe05ff)
      /Users/ketaki/gocode/src/github.com/couchbaselabs/go-couchbase/util.go:43 (0x23486f)
      com/couchbaselabs/go-couchbase.ParseURL: url, err = url.Parse(urlStr)
      /Users/ketaki/gocode/src/github.com/couchbaselabs/go-couchbase/views.go:39 (0x234ca3)
      com/couchbaselabs/go-couchbase.(*Bucket).randomBaseURL: u, err := ParseURL(node.CouchAPIBase)
      /Users/ketaki/gocode/src/github.com/couchbaselabs/go-couchbase/views.go:62 (0x234f08)
      com/couchbaselabs/go-couchbase.(*Bucket).ViewURL: u, err := b.randomBaseURL()
      /Users/ketaki/gocode/src/github.com/couchbaselabs/tuqtng/catalog/couchbase/view_util.go:40 (0x18a7d6)
      com/couchbaselabs/tuqtng/catalog/couchbase.ViewTotalRows: logURL, err := bucket.ViewURL(ddoc, view, options)
      /Users/ketaki/gocode/src/github.com/couchbaselabs/tuqtng/catalog/couchbase/couchbase.go:186 (0x182781)
      com/couchbaselabs/tuqtng/catalog/couchbase.(*bucket).Count: return ViewTotalRows(b.cbbucket, "", "_all_docs", map[string]interface{}{})
      /Users/ketaki/gocode/src/github.com/couchbaselabs/tuqtng/xpipeline/fast_count.go:62 (0x2a1192)
      com/couchbaselabs/tuqtng/xpipeline.(*FastCount).Run: count, err := this.bucket.Count()
      /usr/local/go/src/pkg/runtime/proc.c:1223 (0x19bb0)
      – xpipeline.(*FastCount).RecoverPanic() at fast_count.go:127

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

        Activity

        Hide
        dipti Dipti Borkar added a comment -

        We should not support querying on memcached buckets.

        Show
        dipti Dipti Borkar added a comment - We should not support querying on memcached buckets.
        Hide
        mschoch Marty Schoch added a comment -

        Agree with Dipti, but we should define exactly what that means. Should the bucket even show up in the system catalog? Should it say bucket not found, or give an error that memcached buckets aren't supported, etc.

        Show
        mschoch Marty Schoch added a comment - Agree with Dipti, but we should define exactly what that means. Should the bucket even show up in the system catalog? Should it say bucket not found, or give an error that memcached buckets aren't supported, etc.
        Hide
        dipti Dipti Borkar added a comment -

        should show up in catalog as "memcached" type
        error should be "memcached buckets aren't supported"

        Show
        dipti Dipti Borkar added a comment - should show up in catalog as "memcached" type error should be "memcached buckets aren't supported"
        Hide
        manik Manik Taneja (Inactive) added a comment -

        commit 7b1ed6952f75f7227ceccc2d6c1e95df11957cdd
        Author: manik <manik@couchbase.com>
        Date: Wed Feb 4 18:10:36 2015 +0530

        MB-9370: Error out on memcached buckets

        Show
        manik Manik Taneja (Inactive) added a comment - commit 7b1ed6952f75f7227ceccc2d6c1e95df11957cdd Author: manik <manik@couchbase.com> Date: Wed Feb 4 18:10:36 2015 +0530 MB-9370 : Error out on memcached buckets

          People

          • Assignee:
            manik Manik Taneja (Inactive)
            Reporter:
            ketaki Ketaki Gangal
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes