[SERVER-8567] Large enough Opid will overflow when appended to currentOp output Created: 14/Feb/13  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Diagnostics, Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: David Hows Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 2
Labels: neweng, query-44-grooming
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-23066 killOp should accept negative opid Closed
Assigned Teams:
Query Execution
Operating System: ALL
Sprint: Server 2.7.4, Server 2.7.5, Server 2.7.6
Participants:
Case:

 Description   

We keep the opid as an AtomicUInt but to display we append this to a bsonobject using the BsonObjBuilder.

BSON doesn't support unsigned integers and simply casts them to int's when they are appended so when a large enough opid is passed the number would overload and wrap thus we see a large negative number.



 Comments   
Comment by Geert Bosch [ 10/Mar/16 ]

In addition, it is actually possible to perform 2**32 other operations while having one very long operation, causing two operations with the same opid.

Generated at Thu Feb 08 03:17:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.