[SERVER-36555] Reduce warning messages on slow splitVector commands Created: 09/Aug/18  Updated: 29/Oct/23  Resolved: 15/Nov/22

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 6.2.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Gregory McKeon (Inactive) Assignee: Pol Pinol
Resolution: Fixed Votes: 1
Labels: ShardingRoughEdges, former-quick-wins, neweng, sharding-common-backlog, sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
Backwards Compatibility: Fully Compatible
Sprint: Sharding EMEA 2022-11-28
Participants:
Case:

 Description   

The splitVector command internally uses PlanExecutor::YIELD_AUTO in order to enforce automatic yielding. The plan may yield on any call to getNext() if this is non-NULL. This is used to avoid competition for I/O resources. Basically, we could say that they are slow by design to not interfere with application traffic.

When a splitVector command takes more than 100ms, the default slowMS, it is logged as a W message. Since the query itself is designed to be slower than usual, having a splitVector which needs more than 100ms could be common on some environments and therefore not an indication of any problem.

W SHARDING [conn349989] Finding the split vector for DB.Collection over { _id: 1.0 } keyCount: 146525 numSplits: 0 lookedAt: 145991 took 121ms

We should lower the splitVector slow query logging by either lowering the threshold for slow queries or by logging it as Information rather than as Warning.



 Comments   
Comment by Githook User [ 15/Nov/22 ]

Author:

{'name': 'Pol Pinol Castuera', 'email': 'pol.pinol@mongodb.com', 'username': 'PolPinol'}

Message: SERVER-36555 Reduce warning logs on slow splitVector commands.
Branch: master
https://github.com/mongodb/mongo/commit/a54a5ca40c4f07606844bb360bb16e969d7c988a

Comment by Connie Chen [ 10/Nov/22 ]

pol.pinol@mongodb.com please feel free to reach out to pierlauro.sciarelli@mongodb.com to collaborate on this

Comment by Kaloian Manassiev [ 17/Aug/18 ]

david.storch, yes you are right - thanks for pointing that out!

Comment by David Storch [ 14/Aug/18 ]

kaloian.manassiev, nothing out of the box. I notice, however, that the log line in the description of this ticket comes from split_vector.cpp:

https://github.com/mongodb/mongo/blob/3348045a336df4332ea65fbc3ce9014b6fd2786e/src/mongo/db/s/split_vector.cpp#L260-L265

Can't you just alter the logic around when this particular warning appears in the logs? Or avoid logging it with severity W?

Comment by Kaloian Manassiev [ 13/Aug/18 ]

david.storch, are there any means currently to exclude certain operations (which are expected to be slow) from the slow query logger?

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