summaryrefslogtreecommitdiff
path: root/src/mongo/db/auth/SConscript
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2019-12-29 19:13:13 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-01-16 12:41:35 +0000
commit73b89c6fc4ed6279b52e2588c102c7fc1182189b (patch)
tree0da24518364ce1e7cc753d64b53419595085bf6e /src/mongo/db/auth/SConscript
parentd4a93cea2eee5d2823d7a4d0224db06b4cd15b50 (diff)
downloadmongo-73b89c6fc4ed6279b52e2588c102c7fc1182189b.tar.gz
SERVER-43721 Make the AuthorizationManager use DistCache
The DistCache (to be later renamed to ReadThroughCache) was derived from the same implementation under AuthorizationManager and this change removes the code duplication. In addition, it makes the following changes to InvalidatingLRUCache and the DistCache: * Simplifies and optimises the InvalidatingLRUCache: The way it is implemented now, it performs up to 3 operations per lookup, unvalidates entries unnecessarily and has overly complicated logic, which is source of a crash. Instead of fixing the bug, this change rewrites it in a simpler way, which introduces a ValueHandle instead of bare shared_ptr for the return value, and only performs additional work if entries fall off the underlying LRUCache. * Moves the DistCache under src/util and adds unit tests: This change pulls the DistCache (which is the main consumer of InvalidatingLRUCache) into its own library and moves it to be under src/util like the other caches and adds unit tests. delete mode 100644 jstests/auth/pinned_users.js create mode 100644 jstests/auth/pinned_users_clear_pinned_user_list.js create mode 100644 jstests/auth/pinned_users_exclusive_lock_on_admin.js create mode 100644 jstests/auth/pinned_users_remove_user_document_unpins_user.js create mode 100644 src/mongo/util/dist_cache.cpp rename src/mongo/{db => util}/dist_cache.h (56%) create mode 100644 src/mongo/util/dist_cache_test.cpp
Diffstat (limited to 'src/mongo/db/auth/SConscript')
-rw-r--r--src/mongo/db/auth/SConscript1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mongo/db/auth/SConscript b/src/mongo/db/auth/SConscript
index 6ffcf7467ba..6c579a188eb 100644
--- a/src/mongo/db/auth/SConscript
+++ b/src/mongo/db/auth/SConscript
@@ -162,6 +162,7 @@ env.Library(
'$BUILD_DIR/mongo/util/net/ssl_types',
],
LIBDEPS_PRIVATE=[
+ '$BUILD_DIR/mongo/util/caching',
'$BUILD_DIR/mongo/idl/server_parameter',
],
)