Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-537

Ability to set default maxTimeMS on shell operations

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.0.5
    • Affects Version/s: None
    • Component/s: None
    • None
    • 3
    • Iteration Ibadan
    • Needed
    • Hide

      Users can set a default maxTimeMS value through config.set('maxTimeMS', <number>);. The default is null, i.e. no maxTimeMS applies.

      Show
      Users can set a default maxTimeMS value through config.set('maxTimeMS', <number>); . The default is null , i.e. no maxTimeMS applies.

      Problem Description

      It's possible for a user to run adhoc queries without specifying maxTimeMS and risk overloading a production server. Compass applies a default maxTimeMS to query to stop long/slow operations on the server side and free up resources quickly. 

      Feature request

      1. The Mongo shell inject a maxTimeMS to read operations by default
      2. A command line param to disable the maxTimeMS injection

            Assignee:
            anna.henningsen@mongodb.com Anna Henningsen
            Reporter:
            nicholas.cottrell@mongodb.com Nic Cottrell
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: