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

data race in Fetch.flushBatch()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.6.0, 5.0.0
    • 5.0.0
    • query
    • None
    • Untriaged
    • Unknown

    Description

      To reproduce, go to test/multistore/test_cases/case_functions/testcs_case_func and run "go test -race ." . You should see several data races, including this one.

      WARNING: DATA RACE
      Read by goroutine 115:
        github.com/couchbase/query/execution.(*Fetch).flushBatch()
            /Users/johanlarson/go-workspace/src/github.com/couchbase/query/execution/fetch.go:119 +0x92f
        github.com/couchbase/query/execution.(*Fetch).afterItems()
            /Users/johanlarson/go-workspace/src/github.com/couchbase/query/execution/fetch.go:65 +0x3c
        github.com/couchbase/query/execution.(*base).runConsumer.func1()
            /Users/johanlarson/go-workspace/src/github.com/couchbase/query/execution/base.go:196 +0x397
        sync.(*Once).Do()
            /usr/local/Cellar/go/1.6.2/libexec/src/sync/once.go:44 +0xf6
        github.com/couchbase/query/execution.(*base).runConsumer()
            /Users/johanlarson/go-workspace/src/github.com/couchbase/query/execution/base.go:197 +0xea
        github.com/couchbase/query/execution.(*Fetch).RunOnce()
            /Users/johanlarson/go-workspace/src/github.com/couchbase/query/execution/fetch.go:49 +0x9f
       
      Previous write by goroutine 112:
        github.com/couchbase/query/execution.(*Fetch).flushBatch()
            /Users/johanlarson/go-workspace/src/github.com/couchbase/query/execution/fetch.go:119 +0x948
        github.com/couchbase/query/execution.(*Fetch).afterItems()
            /Users/johanlarson/go-workspace/src/github.com/couchbase/query/execution/fetch.go:65 +0x3c
        github.com/couchbase/query/execution.(*base).runConsumer.func1()
            /Users/johanlarson/go-workspace/src/github.com/couchbase/query/execution/base.go:196 +0x397
        sync.(*Once).Do()
            /usr/local/Cellar/go/1.6.2/libexec/src/sync/once.go:44 +0xf6
        github.com/couchbase/query/execution.(*base).runConsumer()
            /Users/johanlarson/go-workspace/src/github.com/couchbase/query/execution/base.go:197 +0xea
        github.com/couchbase/query/execution.(*Fetch).RunOnce()
            /Users/johanlarson/go-workspace/src/github.com/couchbase/query/execution/fetch.go:49 +0x9f
      
      

      Attachments

        Issue Links

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

          Activity

            People

              johan.larson Johan Larson (Inactive)
              johan.larson Johan Larson (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty