[SERVER-71436] Range deleter must not aggressively spam the log when shard key index not found Created: 17/Nov/22  Updated: 29/Oct/23  Resolved: 05/Dec/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.4.19, 5.0.15, 6.0.4, 6.3.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Pierlauro Sciarelli Assignee: Pierlauro Sciarelli
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
Backwards Compatibility: Fully Compatible
Backport Requested:
v6.2, v6.1, v6.0, v5.0, v4.4
Sprint: Sharding EMEA 2022-11-28, Sharding EMEA 2022-12-12
Participants:

 Description   

The range-deleter is deleting orphaned documents by scanning an index compatible with the shard key.

When no index on the shard key is found on a shard trying to perform orphans deletion, the range-deleter starts to spam the logs aggressively and indefinitely with the "Unable to find shard key index" error; this results in a relevant increase on the log file size up to some GBs per hour.

Purpose of this ticket is to:

  • Throttle the logging of the problem (e.g. by simply introducing a sleep of X seconds in case the shard key index is not found)
  • Change the returned error code from InternalError to the more meaningful IndexNotFound code.


 Comments   
Comment by Githook User [ 21/Dec/22 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-71436 Range deleter must not aggressively spam the log when shard key index not found
Branch: v4.4
https://github.com/mongodb/mongo/commit/19ece9bbfeab344c2d77a7282854496db4e5b7f3

Comment by Githook User [ 21/Dec/22 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-71436 Range deleter must not aggressively spam the log when shard key index not found
Branch: v5.0
https://github.com/mongodb/mongo/commit/300f442d681cfebe47addc1756d8220c9864673e

Comment by Githook User [ 21/Dec/22 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-71436 Range deleter must not aggressively spam the log when shard key index not found
Branch: v6.0
https://github.com/mongodb/mongo/commit/21b2615135067cdb67409f9cae670b315425b0df

Comment by Githook User [ 05/Dec/22 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-71436 Range deleter must not aggressively spam the log when shard key index not found
Branch: master
https://github.com/mongodb/mongo/commit/bf34a18cb9d476d9d1766695b15885a3fd6885af

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