[SERVER-75148] Emit log for every sharding metadata inconsistency found Created: 22/Mar/23  Updated: 29/Oct/23  Resolved: 06/Apr/23

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

Type: Task Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Tommaso Tocci
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Assigned Teams:
Sharding EMEA
Backwards Compatibility: Fully Compatible
Participants:

 Description   

We should emit a log for every inconsistency found while running checkMetadataConsistency command.

The inconsistency details should be included in BSON formatting. The same format use in the reply of the command.

Atlas will then create a log injection rule to automatically detect those inconsistencies.

The log will be emitted with Log ID 7514800 at WARNING level. It could be emitted both from shards and configserver depending which node spotted the inconsistency.

The format of the log is the following:

{
  "t":{"$date":"2023-04-05T15:02:23.765+00:00"},
  "s":"W",  
  "c":"SHARDING", 
  "id":7514800,
  "ctx":"conn44",
  "msg":"Detected sharding metadata inconsistency",
  "attr":{
      "inconsistency":{
          "type":"<<<INCONSISTENCY TYPE>>>",
          "description":"<<<HUMAN READABLE DESCRIPTION>>>"
          "details":\{ <<<BSON object with details about the specific inconsistency>>>}
     }
  }
}



 Comments   
Comment by Githook User [ 05/Apr/23 ]

Author:

{'name': 'toto', 'email': '58224719+toto-dev@users.noreply.github.com', 'username': 'toto-dev'}

Message: SERVER-75148 Emit log for every sharding metadata inconsistency found
Branch: master
https://github.com/mongodb/mongo/commit/6cfa08d3740cf58936e7d6b85bb1c8146937a005

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