[SERVER-58909] Missing versions for "admin" and "config" databases migrating to version 4.2 Created: 28/Jul/21 Updated: 29/Oct/23 Resolved: 03/Aug/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.2.16 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Antonio Fuschetto | Assignee: | Antonio Fuschetto |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Steps To Reproduce: | Attached a JS test (help-26155-simplified.js) that reproduces the problem. |
||||||||||||
| Sprint: | Sharding EMEA 2021-08-09 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
MongoDB 4.0 does not provide versions for admin and config databases. This information has been introduced in MongoDB 4.2 and the management of local sessions needs to known the version of the config database. A problem occurs during the upgrade process, where the binaries of the secondary shards are upgraded before the primary (as suggested in the migration guide). In this scenario, the config database metadata update is implicitly triggered by session management at the secondary shard level (MongoDB 4.2), but this information is not provided by the primary shard as it does not yet support it (MongoDB 4.0). It follows the detailed workflow that triggers the problem:
When the problem is triggered, the following error appears in the logs: InternalError: DatabaseVersion doesn't exist in database entry { _id: "config", partitioned: true, primary: "config" } despite the shard being in binary version 4.2 or later. |
| Comments |
| Comment by Githook User [ 02/Aug/21 ] |
|
Author: {'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}Message: |
| Comment by Antonio Fuschetto [ 02/Aug/21 ] |
|
linda.qin from the Customer Support team confirmed that the customer's problem was resolved as soon as the primary shard was also updated to version 4.2. This confirms my assumption. Therefore, as far as I can understand possible scenarios, it seems that it is enough to fix the branch 4.2 and not the higher ones. |