Skip to content

Backport 1.7.x: Add ability to customize some timeouts in MongoDB database plugin#11637

Merged
pcman312 merged 1 commit intorelease/1.7.xfrom
backport-11600-mongodb-timeouts-1.7.x
May 17, 2021
Merged

Backport 1.7.x: Add ability to customize some timeouts in MongoDB database plugin#11637
pcman312 merged 1 commit intorelease/1.7.xfrom
backport-11600-mongodb-timeouts-1.7.x

Conversation

@pcman312
Copy link
Contributor

Backport to 1.7.x: #11600

This PR adds the ability to customize SocketTimeout, ConnectTimeout, and ServerSelectionTimeout within 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.

@pcman312 pcman312 added this to the 1.7.2 milestone May 17, 2021
@pcman312 pcman312 merged commit fbff9bb into release/1.7.x May 17, 2021
@pcman312 pcman312 deleted the backport-11600-mongodb-timeouts-1.7.x branch May 17, 2021 20:06
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants