[SERVER-67169] Wrong comparison might make shard registry accessed before initialization Created: 10/Jun/22  Updated: 24/Aug/23  Resolved: 24/Aug/23

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

Type: Bug Priority: Major - P3
Reporter: Marcos José Grillo Ramirez Assignee: Tommaso Tocci
Resolution: Declined Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Problem/Incident
is caused by SERVER-66658 Shard registry might be accessed befo... Closed
Operating System: ALL
Backport Requested:
v6.0, v5.0
Sprint: Sharding EMEA 2022-06-13, Sharding EMEA 2022-06-27
Participants:

 Description   

SERVER-66658 intended to solve a race between two different threads trying to access the shard registry while it was being refreshed, however, now we might return that the shard registry is up when it isn't, because comparing the shard registry time with Time() will always be false due to the forceReloadIncrement component.

We should get the topology version component and only compare that with Timestamp() instead.



 Comments   
Comment by Tommaso Tocci [ 15/Jun/22 ]

It turned out that the comparison is actually correct.

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