[SERVER-61806] Uniform range deleter logging of ranges Created: 30/Nov/21  Updated: 29/Oct/23  Resolved: 10/May/23

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

Type: Improvement Priority: Minor - P4
Reporter: Pierlauro Sciarelli Assignee: Allison Easton
Resolution: Fixed Votes: 0
Labels: neweng, sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Problem/Incident
Assigned Teams:
Sharding EMEA
Backwards Compatibility: Fully Compatible
Sprint: Sharding EMEA 2023-04-17, Sharding EMEA 2023-05-15
Participants:
Linked BF Score: 150

 Description   

The beginning of a range removal is logging min and max values without specifying the shard key field(s).

All other log lines from the range deleter - instead - are also attaching the collection's UUID and redacting the range:

"range"_attr = redact(range.toString()))

Unifying the style (always logging UUID and range) would allow TSEs (or anyone else) to aggregate logs joining the fields without having to perform complex transformations/projections.

That's an example of the described discrepancies:

{"t":{"$date":"2021-11-19T14:47:24.091+00:00"},"s":"D1", "c":"RDELETER", "id":23766,   "ctx":"range-deleter","msg":"Begin removal of range","attr":{"min":{"":"1234"},"max":{"":"1235"},"namespace":"db.coll"}}
 
{"t":{"$date":"2021-11-19T16:05:24.155+00:00"},"s":"D1", "c":"RDELETER", "id":23769,   "ctx":"range-deleter","msg":"Deleted documents in pass","attr":{"numDeleted":54381,"namespace":"db.coll","collectionUUID":{"uuid":{"$uuid":"a81a68e7-e11c-424d-bd3f-286e9638e0a7"}},"range":"[{ _id: \"1234\" }, { _id: \"1235\" })"}}



 Comments   
Comment by Githook User [ 10/May/23 ]

Author:

{'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}

Message: SERVER-61806 Don't access ScopedCollectionAcquisition after yield
Branch: master
https://github.com/mongodb/mongo/commit/dae50ed147bc356d3d67119eda061bc85631cb63

Comment by Githook User [ 09/May/23 ]

Author:

{'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}

Message: SERVER-61806 Uniform range deleter logging of ranges
Branch: master
https://github.com/mongodb/mongo/commit/5674a92d77c5b6946555ad515d17071421fd8930

Generated at Thu Feb 08 05:53:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.