Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-2641

Allow int32 or int64 for cursor ID in getMore commandStartedEvent assertions

    • Not Needed
    • Hide

      Sync legacy CSFLE spec tests, unified load balancer tests, and "valid-pass" unified spec test with mongodb/specifications@2a51e98.

      Show
      Sync legacy CSFLE spec tests, unified load balancer tests, and "valid-pass" unified spec test with mongodb/specifications@2a51e98 .
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      PHPLIB-1156 Fixed 1.16.0
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion PHPLIB-1156 Fixed 1.16.0

      Summary

      I noticed that a handful of spec tests (both legacy and unified) only expect an int64 BSON type for the cursor ID in an observed getMore command. The vast majority of specs use a flexible assertion that allows int32 or int64 to accommodate drivers that encode BSON integers in the smallest possible type depending on its value.

      Instead of:

      getMore: { $$type: long }
      

      Tests should use:

      getMore: { $$type: [ int, long ] }
      

      Motivation

      Who is the affected end user?

      Drivers that may conditionally encode integers as int32 or int64, range permitting.

      How likely is it that this problem or use case will occur?

      Rare. Cursor IDs are usually greater than INT32_MAX.

      If the problem does occur, what are the consequences and how severe are they?

      Possible test failure.

      Is this issue urgent?

      No.

      Is this ticket required by a downstream team?

      No.

      Is this ticket only for tests?

      Yes.

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: