[SERVER-16849] On mongos we always invalidate the user cache once, even if no user definitions are changing Created: 14/Jan/15  Updated: 25/Jan/17  Resolved: 04/Mar/15

Status: Closed
Project: Core Server
Component/s: Security, Sharding
Affects Version/s: 2.6.7, 2.8.0-rc4
Fix Version/s: 2.6.10, 3.0.1, 3.1.0

Type: Bug Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Spencer Brody (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-11980 Improve user cache invalidation enfor... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Participants:

 Description   

The mongos' cache invalidator job initializes its _previousCacheGeneration to one generated in memory by the mongos process' AuthorizationManager. Every time the invalidator job runs after that, however, it fetches the cache generation from the config servers. This means the first fetched cache generation will always be different from what _previousCacheGeneration was initialized with, so we'll always invalidate the cache once. The fix should be to initialize _previousCacheGeneration from the value on the config servers.



 Comments   
Comment by Githook User [ 01/May/15 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-16849 Prevent mongos from always invalidating the user cache once, even when no user definitions are changing

(cherry picked from commit 3272a362429edbfa34fd6529e5925317f7b8a6e7)
Branch: v2.6
https://github.com/mongodb/mongo/commit/7993382d5c71f2bdf90cb84271f59c1d9d713789

Comment by Githook User [ 04/Mar/15 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-16849 Prevent mongos from always invalidating the user cache once, even when no user definitions are changing

(cherry picked from commit 3272a362429edbfa34fd6529e5925317f7b8a6e7)
Branch: v3.0
https://github.com/mongodb/mongo/commit/7a079105cb1bf18359c1f4e87ad27e502db7b54f

Comment by Githook User [ 04/Mar/15 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-16849 Prevent mongos from always invalidating the user cache once, even when no user definitions are changing
Branch: master
https://github.com/mongodb/mongo/commit/3272a362429edbfa34fd6529e5925317f7b8a6e7

Generated at Thu Feb 08 03:42:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.