[SERVER-70960] Fix the mismatch between registering operations under the JS engine and their interruptibility Created: 28/Oct/22  Updated: 03/Feb/24

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

Type: Improvement Priority: Minor - P4
Reporter: Mohammad Dashti (Inactive) Assignee: Backlog - Query Integration
Resolution: Unresolved Votes: 0
Labels: qi-javascript
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-56737 Provide a separate path for delisting... Backlog
Assigned Teams:
Query Integration
Participants:

 Description   

Currently, upon start-up of mongod, a global instance of JS script engine is registered as a KillOpListener (i.e., to be called upon a kill operation or interruption) here.

Then, if an interruption happens, the MozJSScriptEngine::interrupt method is called. In this method, we check the operation-to-scope dictionary (in here) to find the scope responsible for the given operation. If the scope mapped to this operation is not found, we create a level-2 debug message (in here).

Given that not all operations are registered under the JS Engine, we have two action items:

  1. Check it's OK that not all operations are registered under the JS Engine. The answer to this item is probably "Yes, it's OK", as not all operations need interaction with the JS engine.
  2. If it's OK not to register all operations under the JS engine, then we need to either completely drop these log messages (i.e., by removing these lines), or increase the debug level of these log messages to the max level. Otherwise, these messages will create an awful pollution of debug-level 2.


 Comments   
Comment by Steve Tarzia [ 15/Nov/22 ]

The fact that this is tied to two HELP tickets suggests we should address it.

Comment by Ana Meza [ 08/Nov/22 ]

mohammad.dashti@mongodb.com just wondering if you see a specific need to work on this now? just asking since we would like to understand the priority

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