[SERVER-32008] shell bench runner should check cursors for nullptr before calling methods on them Created: 16/Nov/17  Updated: 10/Dec/20  Resolved: 10/Dec/20

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

Type: Bug Priority: Major - P3
Reporter: Samantha Ritter (Inactive) Assignee: Robert Guo (Inactive)
Resolution: Won't Fix Votes: 0
Labels: tig-benchrun
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Operating System: ALL
Participants:
Linked BF Score: 0

 Description   

We experience segmentation faults in the shell when network errors cause cursor creation to return nullptr. We could avoid the seg faults and fail more gracefully if we checked for nullptr before calling methods on those objects, like here.



 Comments   
Comment by Robert Guo (Inactive) [ 10/Dec/20 ]

Closing as won't fix. We're deprecating benchrun in favor of genny.

Comment by Chibuikem Amaechi [ 13/Jan/18 ]

Hi Everyone,

My proposed change would be to invoke invariant() right before calling
cursor->itcount() in mongo/src/mongo/shell/bench.cpp:

invariant(cursor != nullptr);
cursor->itcount();

Please share your thoughts.

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