-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: use write fraction when resizing pool (#1031)
The write fraction was only used when filling the pool, and not when creating individual sessions. Instead, the type of session that was created was determined based on the type that was needed at that time. That type would then also be remembered for the lifetime of the session. This is a good default when no write fraction has been set, but it is not logical if the user has configured a write fraction. This change ensures that the write fraction is respected when one is set. When no write fraction has been configured, the default behavior is retained, which means that the type of session is determined based on the type of session that is being created. It is however not 'sticky', which means that if the pool only contains write sessions, and a read session is needed, the pool will return a write session, but its type will be changed to read-only and it will not be prepared for read/write transactions when it is returned to the pool. This improves latency for situations where a burst of write transactions has created a lot of write-prepared sessions in the pool that is followed by a sequence of read-only transactions. Co-authored-by: skuruppu <skuruppu@google.com>
- Loading branch information
Showing
5 changed files
with
624 additions
and
73 deletions.
There are no files selected for viewing
This file contains 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
Oops, something went wrong.