Query with $where may not yield for more than 200ms

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • ALL
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      https://parsley.mongodb.com/test/mongodb_mongo_master_amazon_linux2023_arm64_static_classic_engine_query_patch_only_sharded_collections_jscore_passthrough_4_linux_enterprise_patch_dafcedbbeb2579fc1fb037c1df269bdedab222a8_687eb8f2c92ec700079bd5cd_25_07_21_22_02_33/0/48688b82168a90e17e18d937ee57f369?bookmarks=0,200&shareLine=159

      "Slow query","attr":{"type":"command","isFromUserConnection":true,"ns":"test.jstests_ora","collectionType":"normal","appName":"MongoDB Shell","command":{"count":"jstests_ora","query":{"$or":[{"$where":"this.x === 2"},{"$where":"this.y === 2"}]},"readConcern":{"level":"local","provenance":"implicitDefault"},"shardVersion":{"e":{"$oid":"687ec0199c17aeed13891d26"},"t":{"$timestamp":{"t":1753137177,"i":115}},"v":{"$timestamp":{"t":1,"i":1}}},"lsid":{"id":{"$uuid":"11dc3032-8a2b-4faf-86d6-448804a85e22"},"uid":{"$binary":{"base64":"47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=","subType":"0"}}},"$clusterTime":{"clusterTime":{"$timestamp":{"t":1753137177,"i":161}}},"$configTime":{"$timestamp":{"t":1753137177,"i":142}},"$topologyTime":{"$timestamp":{"t":1753137159,"i":54}},"$client":{"application":{"name":"MongoDB Shell"},"driver":{"name":"MongoDB Internal Client","version":"8.2.0-alpha2-85-gdafcedb-patch-687eb8f2c92ec700079bd5cd"},"os":{"type":"Linux","name":"Amazon Linux release 2023.8.20250707 (Amazon Linux)","architecture":"aarch64","version":"Kernel 6.1.141-165.249.amzn2023.aarch64"},"mongos":{"host":"ip-10-122-43-246.ec2.internal:20253","client":"127.0.0.1:42078","version":"8.2.0-alpha2-85-gdafcedb-patch-687eb8f2c92ec700079bd5cd"}},"mayBypassWriteBlocking":false,"$db":"test"},"planSummary":"COLLSCAN","planningTimeMicros":214011,"keysExamined":0,"docsExamined":6,"numYields":0,"nreturned":1,"planCacheShapeHash":"E185B21A","queryHash":"E185B21A","planCacheKey":"8F76C583","reslen":152,"locks":{"Global":{"acquireCount":{"r":7}}},"readConcern":{"level":"local","provenance":"implicitDefault"},"storage":{"timeWaitingMicros":{"storageExecutionMicros":4695}},"cpuNanos":2598306,"remote":"127.0.0.1:35230","protocol":"op_msg","delinquencyInfo":{"totalDelinquentAcquisitions":1,"totalAcquisitionDelinquencyMillis":214,"maxAcquisitionDelinquencyMillis":214},"queues":{"ingress":{"admissions":7},"execution":{"admissions":2}},"workingMillis":214,"durationMillis":214}
      

      https://parsley.mongodb.com/test/mongodb_mongo_master_amazon_linux2023_arm64_static_classic_engine_query_patch_only_sharding_jscore_passthrough_1_linux_enterprise_patch_dafcedbbeb2579fc1fb037c1df269bdedab222a8_68892a068bcf3a00071f4f07_25_07_29_20_07_41/0/37417d47c4ab1b734cf63a518d1a9b35?bookmarks=0,204&shareLine=0

      "Slow query","attr":{"type":"command","isFromUserConnection":true,"ns":"test.jstests_ora","collectionType":"normal","appName":"MongoDB Shell","command":{"count":"jstests_ora","query":{"$or":[{"$where":"this.x === 2"},{"$where":"this.y === 2"}]},"readConcern":{"level":"local","provenance":"implicitDefault"},"shardVersion":{"e":{"$oid":"000000000000000000000000"},"t":{"$timestamp":{"t":0,"i":0}},"v":{"$timestamp":{"t":0,"i":0}}},"databaseVersion":{"uuid":{"$uuid":"80e6c028-b877-448d-be68-a35d94cad746"},"timestamp":{"$timestamp":{"t":1753821501,"i":32}},"lastMod":1},"lsid":{"id":{"$uuid":"733f104b-7918-45d9-930a-4644f7ec7994"},"uid":{"$binary":{"base64":"47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=","subType":"0"}}},"$clusterTime":{"clusterTime":{"$timestamp":{"t":1753821501,"i":57}}},"$configTime":{"$timestamp":{"t":1753821501,"i":43}},"$topologyTime":{"$timestamp":{"t":1753821450,"i":69}},"$client":{"application":{"name":"MongoDB Shell"},"driver":{"name":"MongoDB Internal Client","version":"8.2.0-alpha2-85-gdafcedb-patch-68892a068bcf3a00071f4f07"},"os":{"type":"Linux","name":"Amazon Linux release 2023.8.20250715 (Amazon Linux)","architecture":"aarch64","version":"Kernel 6.1.141-165.249.amzn2023.aarch64"},"mongos":{"host":"ip-10-128-187-235.ec2.internal:20003","client":"127.0.0.1:45626","version":"8.2.0-alpha2-85-gdafcedb-patch-68892a068bcf3a00071f4f07"}},"mayBypassWriteBlocking":false,"$db":"test"},"planSummary":"COLLSCAN","planningTimeMicros":100722,"keysExamined":0,"docsExamined":10,"numYields":0,"nreturned":1,"planCacheShapeHash":"E185B21A","queryHash":"E185B21A","planCacheKey":"8F76C583","reslen":152,"locks":{"Global":{"acquireCount":{"r":9}}},"readConcern":{"level":"local","provenance":"implicitDefault"},"storage":{"timeWaitingMicros":{"storageExecutionMicros":33738}},"cpuNanos":3411452,"remote":"127.0.0.1:60704","protocol":"op_msg","delinquencyInfo":{"totalDelinquentAcquisitions":1,"totalAcquisitionDelinquencyMillis":102,"maxAcquisitionDelinquencyMillis":102},"queues":{"ingress":{"admissions":9},"execution":{"admissions":2}},"workingMillis":102,"durationMillis":102}
      

      Please close this ticket as “Work as Design” or “Won’t Do” if this is expected or the testing issue.

              Assignee:
              Unassigned
              Reporter:
              Zixuan Zhuang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: