Operational Defect Database

BugZero found this defect 95 days ago.

MongoDB | 2576198

Resharding coordinator use possibly stale database info

Last update date:

3/13/2024

Affected products:

MongoDB Server

Affected releases:

5.0.0

6.0.0

7.0.0

8.0.0-rc0

7.3.0-rc3

Fixed releases:

8.0.0-rc0

5.0.26

6.0.15

7.0.7

7.0.8

Description:

Info

Resharding coordinator force a refresh of the collection routing info cache and then extracts the database primary shard from it. While this ensures that the collection metadata retrieved is causally consistent with the latest DDL operation executed on the collection itself, it does not guarantee that the database metadata is causally consistent with the latest DDL operations executed on the database. In fact forcing a refresh of the collection routing info does not also force a refresh of the database info cache. This means that the database primary shard exposed through the collection routing info cache could be stale. If resharding coordinator uses a stale database primary shard information, it could happen that it will not include the current database primary shard in the set of recipient shard of the resharding operation. The result is that the resharding operation will miss updating the state of the target collection on the database primary shard, leaving the local catalog on that shard in an inconsistent state. This is particularly problematic because DDL operations rely on the assumption that the database primary shard always has correct and up-to-date information about collections in the database the node is primary for.

Top User Comments

xgen-internal-githook commented on Tue, 12 Mar 2024 10:24:30 +0000: Author: {'name': 'Tommaso Tocci', 'email': '58224719+toto-dev@users.noreply.github.com', 'username': 'toto-dev'} Message: SERVER-86622 Resharding coordinator use possibly stale database info (#19095) (cherry picked from commit 2e0996196802d214edd0c6149b2aaa30d5a1b6c9) (cherry picked from commit cf802f3300d9bbff2043b34a322961aab7afe046) (cherry picked from commit 0d83c2d296c94660994f98350c0775d73d2809c2) GitOrigin-RevId: 3e13eed6c4658ab9e89143324d7e55973f687be8 Branch: v5.0 https://github.com/mongodb/mongo/commit/56b59b3bb150150ed743e838f417762138b9fada xgen-internal-githook commented on Mon, 11 Mar 2024 18:28:23 +0000: Author: {'name': 'Tommaso Tocci', 'email': '58224719+toto-dev@users.noreply.github.com', 'username': 'toto-dev'} Message: SERVER-86622 Resharding coordinator use possibly stale database info (#19095) (cherry picked from commit 2e0996196802d214edd0c6149b2aaa30d5a1b6c9) (cherry picked from commit cf802f3300d9bbff2043b34a322961aab7afe046) GitOrigin-RevId: 2bb99cc2e3b274ccd1d3cda66edbb3bf7a6eb177 Branch: v6.0 https://github.com/mongodb/mongo/commit/d414f6baf0fcbef1042bd7bc246238956b8c67ce xgen-internal-githook commented on Sun, 10 Mar 2024 07:31:07 +0000: Author: {'name': 'Tommaso Tocci', 'email': '58224719+toto-dev@users.noreply.github.com', 'username': 'toto-dev'} Message: SERVER-86622 Resharding coordinator use possibly stale database info (#19095) (cherry picked from commit 2e0996196802d214edd0c6149b2aaa30d5a1b6c9) GitOrigin-RevId: cf802f3300d9bbff2043b34a322961aab7afe046 Branch: v7.0 https://github.com/mongodb/mongo/commit/667c87626e5ec0eec23d10c31288d7f70edb22e3 xgen-internal-githook commented on Tue, 20 Feb 2024 11:09:39 +0000: Author: {'name': 'Tommaso Tocci', 'email': '58224719+toto-dev@users.noreply.github.com', 'username': 'toto-dev'} Message: SERVER-86622 Resharding coordinator use possibly stale database info (#19095) GitOrigin-RevId: 2e0996196802d214edd0c6149b2aaa30d5a1b6c9 Branch: master https://github.com/mongodb/mongo/commit/383c1c8b2b5660f3795096dbdab1d4fa8bfef0d5

Steps to Reproduce

Run the following test in the sharding suite resharding_stale_database_info.js

Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Closed

Learn More

Search:

...