'listCollections' command "type" field does not return "timeseries" inside $listSearchIndexes handler on sharded collections for viewless timeseries

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Integration
    • ALL
    • Hide

      In SERVER-108407, I added the testSearchIndexCommandsDisallowedOnTsCollection function in 'search_disallowed_on_timeseries.js'.

       

      To observe this behavior locally:

       

      Then run the following command

       

      buildscripts/resmoke.py run --suites=mongot_e2e_sharded_collections --runAllFeatureFlagTests jstests/with_mongot/e2e/search_disallowed_on_timeseries.js

       

       

      And grep / look for the log statement you added, to observe that the "type" field is "collection" (instead of "timeseries" as expected).

       

      You can also run some other testing combinations to observe the correct value of value of "type" in similar situations:

      All these situations should return the correct value of "timeseries"

      Show
      In SERVER-108407 , I added the testSearchIndexCommandsDisallowedOnTsCollection function in 'search_disallowed_on_timeseries.js'.   To observe this behavior locally: Add a debug log to observe the value of bsonDoc ["type"] here Comment out the featureFlagCreateViewlessTimeseriesCollections flag in 'fully_disabled_feature_flags.yml' here (so that the test runs in viewless ts mode) Comment out testSearchStagesDisallowedOnTsCollection and all the logic in testSearchIndexCommandsDisallowedOnTsCollection except the 4th step of the test that runs $listSearchIndexes   Then run the following command   buildscripts/resmoke.py run --suites=mongot_e2e_sharded_collections --runAllFeatureFlagTests jstests/with_mongot/e2e/search_disallowed_on_timeseries.js     And grep / look for the log statement you added, to observe that the "type" field is "collection" (instead of "timeseries" as expected).   You can also run some other testing combinations to observe the correct value of value of "type" in similar situations: Comment everything out in 'search_disallowed_on_timeseries.js' except the 1st step of creating the search index Re-disable featureFlagCreateViewlessTimeseriesCollections in 'fully_disabled_feature_flags.yml' to observe the behavior with viewful timeseries Run against the "mongot_e2e_single_shard" or "mongot_e2e_sharded_cluster" evergreen suite All these situations should return the correct value of "timeseries"
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Upon implementing SERVER-108407, it was discovered that the 'listCollections' command that is run here (inside SearchIndexProcessRouter::fetchCollectionUUIDAndResolveView), while running the $listSearchIndexes aggregation stage (enters here) on a sharded collections topology (note not the sharded cluster topology where the collection is not sharded) on a viewless time-series collection returns the incorrect value of "collection" instead of "timeseries" for the "type" field.

       

      Note that for both running the $listSearchIndex commands on other sharded toplogies (single shard and sharded cluster), and when running the other search index db commands (on all topologies) we get the correct value of "timeseries". So this issue is specific to the combination of:

      • Running $listSearchIndexes aggregation stage
      • On a sharded collections topology
      • Against a viewless timeseries collection

       

      The shard interface for the analogous logic appears to be returning the correct result of if the collection is a timeseries for all 4 operations ($listSearchIndexes, createSearchIndex, updateSearch, dropSearchIndex).

      Note that all 4 of these operations use a common interface for search index operations defined here.

       

      Its unclear if the search index logic is doing something incorrect in this case, or if its a CAR issue (or some combination of both). The assignee of this ticket will need to investigate the root cause deeper to see which team(s) need to patch this issue.

       

      To begin investigating, start with the question, why on a sharded collection topology against a viewless time-series collection, does $listSearchIndex have different behavior w.r.t the 'listCollections' call to the search index commands (createSearchIndex, updateSearchIndex, dropSearchIndex)? Perhaps the fact that $listSearchIndexes and the search index commands have different remote rpc entry points on the router has something to do with it.

            Assignee:
            Unassigned
            Reporter:
            Joe Shalabi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: