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

Explain hangs sometimes because sample query does not return

    XMLWordPrintable

Details

    • Untriaged
    • 0
    • No

    Description

      Here is a very simple repro!

      select 1, count (*) from T;

      Looking at the related operator tree that feeds the sampling query, there are two datasourceScanOperators (one for T and one for the sample of T). There should only the sample data source. So the query seems malformed/

      Here is the query

      select 001, count(1) from R, S, T where  int64_default_null (R.u256) =  int64_default_null (S.u256)  and R.rand <= 1   and S.rand <= 1;
      

      This happens only with CBO as samples are required.

      The routine that hangs is

      AnalysisUtil.runQuery(newAggOpRef, Arrays.asList(aggVar), newCtx, IRuleSetFactory.RuleSetKind.SAMPLING);

      Large temp files such as these are created during this call

      8124694528 Mar  8 12:06 JID$0.307$CDID$4$9$014392691293695800873.waf

      and we run out of disk space.

      This does not always happen

      Do not know if this is data dependent.

      couchbase-cli bucket-create -c http://localhost:9000 -u couchbase -p couchbase --bucket R --bucket-type couchbase --bucket-ramsize 800 --bucket-replica 0

      /couchbase-cli bucket-create -c http://localhost:9000 -u couchbase -p couchbase --bucket S --bucket-type couchbase --bucket-ramsize 800 --bucket-replica 0

      couchbase-cli bucket-create -c http://localhost:9000 -u couchbase -p couchbase --bucket T --bucket-type couchbase --bucket-ramsize 800 --bucket-replica 0

      ------------------------

      cbimport csv -c http://localhost:9000 -u couchbase -p couchbase -b R -d file://./R.tbl -g key::%rand% --infer-types --field-separator '|'

      cbimport csv -c http://localhost:9000 -u couchbase -p couchbase -b S -d file://./S.tbl -g key::%rand% --infer-types --field-separator '|'

      /cbimport csv -c http://localhost:9000 -u couchbase -p couchbase -b T -d file://./T.tbl -g key::%rand% --infer-types --field-separator '|'

      -----------------------

      R.tbl is included. The same file can be used for S.tbl and T.tbl

      Attachments

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

        Activity

          People

            murali.krishna Murali Krishna
            murali.krishna Murali Krishna
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There is 1 open Gerrit change

                PagerDuty