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

[5.0.0 Build Sanity] Search on an index with default type mapping not yielding any results

    XMLWordPrintable

Details

    • Untriaged
    • Yes

    Description

      Build : 5.0.0-2434 onwards
      Last known good build : 5.0.0-2431
      Changelog : http://172.23.123.43:8000/getchangelog?rel=5.0.0&fromb=2431&tob=2434

      Test :
      ./testrunner -i node_conf.ini get-cbcollect-info=True,get-couch-dbinfo=True,skip_cleanup=False -t fts.stable_topology_fts.StableTopFTS.run_default_index_query,items=1000,query="

      {\"match\": \"safiya@mcdiabetes.com\", \"field\":\"email\"}

      ",expected_hits=1000,cluster=D+F

      Issue : Search on a simple index with default type mapping and no other customizations is not working since build 5.0.0-2434. The same test works fine for build 5.0.0-2431. Tried the following manually to re-confirm.
      1. Installed beer-sample bucket
      2. Created a simple default index
      3. Search for beer.
      In 2431 it returns some results, while no results are returned for 5.0.0-2434+.

      CBcollect info attached.

      The following commit might have caused the regression :

      • Commit: 807463d607f2ad1024b5f3c5b45bccadfb833671 (in build: 2434)
        Author: Marty Schoch
        update Segment interface to allow for different implementations

      Previously methods assumed an integer offset could be used to
      interact with elements in the segment. Now the keys are
      used directly to describe the operations.

      Removed:
      FindKeyPos(key []byte)
      FindStartKeyInclusivePos(startKeyInclusive []byte)
      GetOperationKeyVal(pos int)

      Added:
      Get(key []byte)
      Cursor(startKeyInclusive []byte, endKeyExclusive []byte)

      Cursor returns a new SegmentCursor inteface with methods:
      Current()
      Next()
      Seek(startKeyInclusive []byte)

      Get(key []byte) (operation uint64, val []byte, error)

      Change-Id: I7013c721cf67fc71967ac86bae806b5f1fc710f5
      Reviewed-on: http://review.couchbase.org/75744
      Reviewed-by: Steve Yen
      Tested-by: Marty Schoch

      Testrunner output :

      [2017-03-27 17:21:52,798] - [fts_base:3750] INFO - Loading phase complete!
      [2017-03-27 17:21:52,813] - [fts_base:860] INFO - Checking if index already exists ...
      [2017-03-27 17:21:52,824] - [rest_client:803] ERROR - http://172.23.108.252:8094/api/index/default_index_1 error 403 reason: status: 403, content: rest_auth: preparePerm, err: index not found
       rest_auth: preparePerm, err: index not found
      [2017-03-27 17:21:52,827] - [rest_client:803] ERROR - http://172.23.108.252:8094/api/index/default_index_1 error 403 reason: status: 403, content: rest_auth: preparePerm, err: index not found
       rest_auth: preparePerm, err: index not found
      [2017-03-27 17:21:52,827] - [fts_base:869] INFO - Creating fulltext-index default_index_1 on 172.23.108.252
      [2017-03-27 17:21:52,827] - [rest_client:2454] INFO - {"params": {}, "name": "default_index_1", "planParams": {"numReplicas": 0, "maxPartitionsPerPIndex": 171}, "sourceName": "default", "sourceUUID": "", "sourceType": "couchbase", "type": "fulltext-index", "sourceParams": {"authUser": "default", "dataManagerSleepMaxMS": 20000, "authSaslUser": "", "clusterManagerSleepMaxMS": 20000, "authSaslPassword": "", "clusterManagerSleepInitMS": 0, "dataManagerBackoffFactor": 0, "authPassword": "", "dataManagerSleepInitMS": 0, "feedBufferAckThreshold": 0, "feedBufferSizeBytes": 0, "clusterManagerBackoffFactor": 0}, "uuid": ""}
      [2017-03-27 17:21:52,854] - [rest_client:2463] INFO - Index default_index_1 created
      [2017-03-27 17:21:52,854] - [fts_base:3443] INFO - Validating index distribution for default_index_1 ...
      [2017-03-27 17:21:52,871] - [fts_base:3352] INFO - sleep for 5 secs. No pindexes found, waiting for index to get created ...
      [2017-03-27 17:21:57,899] - [fts_base:3461] INFO - Validated: Number of PIndexes = 6
      [2017-03-27 17:21:57,904] - [fts_base:3473] INFO - Validated: Every pIndex serves 171 partitions or lesser
      [2017-03-27 17:21:57,905] - [fts_base:3489] INFO - Validated: pIndexes are distributed across [u'f0db22d79bffca108fe686aa4695a675'] 
      [2017-03-27 17:21:57,905] - [fts_base:3495] INFO - Expecting num of partitions in each node in range 853-1024
      [2017-03-27 17:21:57,905] - [fts_base:3510] INFO - Validated: Node f0db22d79bffca108fe686aa4695a675 houses 6 pindexes which serve 1024 partitions
      [2017-03-27 17:21:57,924] - [fts_base:3373] INFO - Docs in bucket = 1000, docs in FTS index 'default_index_1': 1000
      [2017-03-27 17:21:57,942] - [fts_base:3602] INFO - Docs in index default_index_1=1000, bucket docs=1000
      [2017-03-27 17:21:57,948] - [fts_base:1958] INFO - Running query {"indexName": "default_index_1", "from": 0, "fields": [], "explain": false, "ctl": {"timeout": 60000, "consistency": {"vectors": {}, "level": ""}}, "query": {"field": "email", "match": "safiya@mcdiabetes.com"}, "size": 10000000} on node: 172.23.108.252:
      ERROR
      ...
      ...
      ======================================================================
      ERROR: run_default_index_query (fts.stable_topology_fts.StableTopFTS)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "pytests/fts/stable_topology_fts.py", line 64, in run_default_index_query
          expected_hits=expected_hits)
        File "pytests/fts/fts_base.py", line 1068, in execute_query
          % (expected_hits, hits))
      FTSException: Expected hits: 1000, fts returned: 0
       
      ----------------------------------------------------------------------
      

      Attachments

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

        Activity

          People

            steve Steve Yen
            mihir.kamdar Mihir Kamdar (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty