[SERVER-37426] FSM snapshot read tests mis-handle type information Created: 02/Oct/18  Updated: 29/Oct/23  Resolved: 25/Oct/18

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.1.5

Type: Bug Priority: Major - P3
Reporter: Daniel Gottlieb (Inactive) Assignee: Xiangyu Yao (Inactive)
Resolution: Fixed Votes: 0
Labels: neweng, test-fix
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-37009 Handle missing sessionDocToKill in sn... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Storage NYC 2018-11-05
Participants:
Linked BF Score: 7

 Description   

For better or worse, `killCursors` requires the list of cursor IDs to be of type NumberLong. cursorIds returned in a response are always of the appropriate type and round-trip appropriately. However this helper assigns the cursorId to a floating point 0. Calling `killCursors` on this ID results in a type error.

I'm not sure if there's value in sending a kill cursors command with a cursorId of 0, but I would recommend two changes:

  1. The assignment of `data.cursorId = 0` should instead be to `NumberLong(0)`.
  2. The FSM test should not send a `killCursors` command if the cursorId is 0.


 Comments   
Comment by Githook User [ 25/Oct/18 ]

Author:

{'name': 'Xiangyu Yao', 'email': 'xiangyu.yao@mongodb.com', 'username': 'xy24'}

Message: SERVER-37426 snapshot_read_utils.js should reset the cursorId to NumberLong(0) rather than 0
Branch: master
https://github.com/mongodb/mongo/commit/ff836d8bbe07e5171e132d5685acef0bcd09ae09

Generated at Thu Feb 08 04:45:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.