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

Decreasing max_array_seckey_size setting when array of larger size is indexed causes indexer panic upon mutation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 4.5.1
    • 4.5.0
    • secondary-index
    • Untriaged
    • No

    Description

      When a document D1 with large array is indexed and the setting max_array_seckey_size is decreased to a low value, a mutation in D1 array causes panic of indexer. Decrease in the setting value for old keys need to be handled. This affects only forestdb index and not memdb index. Alternatively, reduction of this setting when indexes are present can be disallowed/ignored.

      Stacktrace for the panic:
      panic: Array to be indexed too long

      goroutine 130 [running]:
      panic(0x4aaf180, 0xc820123870)
      /Users/prathibha-mac/.cbdepscache/exploded/x86_64/go-1.6/go/src/runtime/panic.go:464 +0x3e6 fp=0xc82355b868 sp=0xc82355b7e8
      github.com/couchbase/indexing/secondary/common.CrashOnError(0x6310028, 0xc820123870)
      /Users/prathibha-mac/Documents/source/cb/goproj/src/github.com/couchbase/indexing/secondary/common/util.go:368 +0x4b fp=0xc82355b890 sp=0xc82355b868
      github.com/couchbase/indexing/secondary/indexer.(*fdbSlice).checkFatalDbError(0xc8200e6000, 0x6310028, 0xc820123870)
      /Users/prathibha-mac/Documents/source/cb/goproj/src/github.com/couchbase/indexing/secondary/indexer/forestdb_slice_writer.go:823 +0x2f fp=0xc82355b8e0 sp=0xc82355b890
      github.com/couchbase/indexing/secondary/indexer.(*fdbSlice).insertSecArrayIndex(0xc8200e6000, 0xc8245cc000, 0x69f, 0x800, 0xc82429f800, 0x692, 0x800, 0xc8242a4ea0, 0xb, 0xb, ...)
      /Users/prathibha-mac/Documents/source/cb/goproj/src/github.com/couchbase/indexing/secondary/indexer/forestdb_slice_writer.go:503 +0x8cb fp=0xc82355bcd0 sp=0xc82355b8e0
      github.com/couchbase/indexing/secondary/indexer.(*fdbSlice).insert(0xc8200e6000, 0xc8245cc000, 0x69f, 0x800, 0xc82429f800, 0x692, 0x800, 0xc8242a4ea0, 0xb, 0xb, ...)
      /Users/prathibha-mac/Documents/source/cb/goproj/src/github.com/couchbase/indexing/secondary/indexer/forestdb_slice_writer.go:355 +0x14a fp=0xc82355bd40 sp=0xc82355bcd0
      github.com/couchbase/indexing/secondary/indexer.(*fdbSlice).handleCommandsWorker(0xc8200e6000, 0x0)
      /Users/prathibha-mac/Documents/source/cb/goproj/src/github.com/couchbase/indexing/secondary/indexer/forestdb_slice_writer.go:314 +0x4c6 fp=0xc82355bf90 sp=0xc82355bd40
      runtime.goexit()
      /Users/prathibha-mac/.cbdepscache/exploded/x86_64/go-1.6/go/src/runtime/asm_amd64.s:1998 +0x1 fp=0xc82355bf98 sp=0xc82355bf90
      created by github.com/couchbase/indexing/secondary/indexer.NewForestDBSlice
      /Users/prathibha-mac/Documents/source/cb/goproj/src/github.com/couchbase/indexing/secondary/indexer/forestdb_slice_writer.go:158 +0x1990

      Attachments

        Issue Links

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

          Activity

            People

              prathibha Prathibha Bisarahalli (Inactive)
              prathibha Prathibha Bisarahalli (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty