Commit Graph

10 Commits

Author SHA1 Message Date
Steve McClure 1ffbc6c2e9 SERVER-109432: Autofix JS var usage to favor let (#40637)
GitOrigin-RevId: 9674b7db36a0f3f650d39c1e3fb2ad6ff2141cfb
2025-08-28 19:21:01 +00:00
Zac 591928c619 SERVER-108478 JS formatted by prettier and remove clang-format (#39656)
GitOrigin-RevId: 6c8f6aded47f260aa4f7c231b17dae3302cb1e04
2025-08-21 17:27:09 +00:00
Matt Broadstone a4f458fe4d SERVER-79735 Convert jstest corpus to use es modules 2023-08-06 20:48:04 +00:00
Pavi Vetriselvan e1daee88b3 SERVER-49996 Ensure getSiblingDB() is used instead of getSisterDB() 2020-08-17 16:11:37 +00:00
Kaloian Manassiev 73b89c6fc4 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
2020-01-16 12:41:35 +00:00
clang-format-7.0.1 134a408395
SERVER-41772 Apply clang-format 7.0.1 to the codebase 2019-07-27 11:02:23 -04:00
Billy Donahue a057d5cf18 SERVER-36742 : wait on the spawned parallel shell 2018-08-20 17:31:29 -04:00
Jonathan Reams 2c504892ae SERVER-35890 refactor User cache into InvalidatingLRUCache and UserHandle 2018-08-01 12:56:36 -04:00
Ben Caimano 6711ab3bbc Revert "SERVER-35890 refactor User cache into InvalidatingLRUCache and UserHandle"
This reverts commit 78dec36222.
2018-07-31 18:32:19 -04:00
Jonathan Reams 78dec36222 SERVER-35890 refactor User cache into InvalidatingLRUCache and UserHandle 2018-07-31 16:35:29 -04:00