-
Notifications
You must be signed in to change notification settings - Fork 857
Introduces a separate thread in the UserManager. #21857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: devel
Are you sure you want to change the base?
Conversation
|
||
std::lock_guard guard{_loadFromDBLock}; // must be first | ||
WRITE_LOCKER(writeGuard, _userCacheLock); // must be second | ||
READ_LOCKER(readGuard, _userCacheLock); // must be second |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove comment.
@@ -379,27 +409,34 @@ VPackBuilder auth::UserManager::allUsers() { | |||
} | |||
|
|||
void auth::UserManager::triggerCacheRevalidation() { | |||
triggerLocalReload(); | |||
uint64_t versionToReloadTo = globalVersion() + 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be const
.
} | ||
} | ||
// This test is not really applicable anymore. | ||
// Neither triggerGlobalReload or triggerLocal reload are incrementing the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Neither triggerGlobalReload or triggerLocal reload are incrementing the | |
// Neither triggerGlobalReload or triggerLocalReload are incrementing the |
@@ -229,7 +229,7 @@ function testSuite() { | |||
} | |||
let aliveStatus = waitForAlive(30, coordinator.url, { auth: { bearer: jwt } }); | |||
// note: this should actually work, but currently doesn't TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove comment?
Add a separate thread to the UserManger to handle the load of the user-cache asynchronously.
This pre-loads the user-cache as fast as possible (as soon as the global version changes)
Also, compared to the old version, this allows the read-only operation to work on the user-cache
for longer and not block each other while trying to load a new version. On a high load environment this also
means a more responsive UserManger.
Scope & Purpose
Checklist
Related Information
(Please reference tickets / specification / other PRs etc)