Simple collation is included in index information

XMLWordPrintableJSON

    • Type: Build Failure
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Python Drivers
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      Name of Failure:

      test_indexes_same_keys_different_collations

      Link to task:

      https://spruce.corp.mongodb.com/task/mongo_python_driver_compression_snappy_rhel8_test_standard_latest_python3.11_async_noauth_nossl_standalone_cov_patch_f31ba09713ff61086f5ebddb43a1e79b419b9802_69e0fbfe9f5fa20007fe6a18_26_04_16_15_10_56/tests?execution=0&sorts=STATUS%3AASC

      Context of when and why the failure occurred:

      SERVER-89953 causes list_indexes to no longer exclude the {locale: "simple"} parameter.

      Stack trace:

      
      
      [2026/04/16 08:27:54.761] FAILURE: AssertionError: 'collation' unexpectedly found in {'v': 2, 'key': [('fieldname', 1)], 'collation': SON([('locale', 'simple')])} ()
      [2026/04/16 08:27:54.761] self = <test.asynchronous.test_collation.TestCollation testMethod=test_indexes_same_keys_different_collations>
      [2026/04/16 08:27:54.761]     async def test_indexes_same_keys_different_collations(self):
      [2026/04/16 08:27:54.761]         await self.db.test.drop()
      [2026/04/16 08:27:54.761]         usa_collation = Collation("en_US")
      [2026/04/16 08:27:54.761]         ja_collation = Collation("ja")
      [2026/04/16 08:27:54.761]         await self.db.test.create_indexes(
      [2026/04/16 08:27:54.761]             [
      [2026/04/16 08:27:54.761]                 IndexModel("fieldname", collation=usa_collation),
      [2026/04/16 08:27:54.761]                 IndexModel("fieldname", name="japanese_version", collation=ja_collation),
      [2026/04/16 08:27:54.761]                 IndexModel("fieldname", name="simple"),
      [2026/04/16 08:27:54.761]             ]
      [2026/04/16 08:27:54.761]         )
      [2026/04/16 08:27:54.761]         indexes = await self.db.test.index_information()
      [2026/04/16 08:27:54.761]         self.assertEqual(
      [2026/04/16 08:27:54.761]             usa_collation.document["locale"], indexes["fieldname_1"]["collation"]["locale"]
      [2026/04/16 08:27:54.761]         )
      [2026/04/16 08:27:54.761]         self.assertEqual(
      [2026/04/16 08:27:54.761]             ja_collation.document["locale"], indexes["japanese_version"]["collation"]["locale"]
      [2026/04/16 08:27:54.761]         )
      [2026/04/16 08:27:54.761] >       self.assertNotIn("collation", indexes["simple"])
      [2026/04/16 08:27:54.761] E       AssertionError: 'collation' unexpectedly found in {'v': 2, 'key': [('fieldname', 1)], 'collation': SON([('locale', 'simple')])}
      [2026/04/16 08:27:54.761] test/asynchronous/test_collation.py:260: AssertionError
      
      
      

            Assignee:
            Noah Stapp
            Reporter:
            Noah Stapp
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: