Backport 1.7.x: Add ability to customize some timeouts in MongoDB database plugin#11637
Merged
pcman312 merged 1 commit intorelease/1.7.xfrom May 17, 2021
Merged
Conversation
calvn
approved these changes
May 17, 2021
pull bot
pushed a commit
to Zezo-Ai/vault
that referenced
this pull request
Jan 9, 2026
…rp#11676) * [UI] Ember Data Migration: KMIP Config (hashicorp#11637) * converts kmip configuration route to ts * adds ts and template lint deps to kmip engine * adds api service to kmip engine * updates kmip configuration route to use api service * converts kmip configuration template to page component * converts kmip configure route to ts * updates kmip configure workflow to use api service and form class * enables ts transform in kmip engine * fixes a11y violations on kmip configuration page * Update ui/app/forms/secrets/kmip/config.ts Co-authored-by: lane-wetmore <lane.wetmore@hashicorp.com> --------- Co-authored-by: lane-wetmore <lane.wetmore@hashicorp.com> * fixes lint error --------- Co-authored-by: Jordan Reimer <zofskeez@gmail.com> Co-authored-by: lane-wetmore <lane.wetmore@hashicorp.com> Co-authored-by: Jordan Reimer <jordan.reimer@hashicorp.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport to 1.7.x: #11600
This PR adds the ability to customize
SocketTimeout,ConnectTimeout, andServerSelectionTimeoutwithin MongoDB connections. Vault passes these values to the MongoDB library when it makes a client connection.This also makes some improvements around throughput. Previously, when an operation came to the plugin (creating/destroying a user, etc.), it would lock a mutex for the entirety of the operation. This resulted in the plugin forcing all requests to be single-threaded. This moves the mutex lock a bit lower in the plugin to try to limit its scope and allow multiple threads to be manipulating users at the same time. I did run a bunch of tests to try to produce races and didn't find any within the plugin code. However, I did find a race within the DB engine which I think is fixed in
builtin/logical/database/path_rotate_credentials.go. The lock was being unlocked before the connection was being being closed & removed from the DBI map (b.connections). This probably wasn't a serious issue in practice as the map isn't changed in this manner very frequently.