-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR fixes a sneaky issue in the hashtable locking, the construct used to get the worker index only once per thread was actually being called only the very first time by only one thread causing all the other threads to have a worker_index of 0. As consequence the locking was potentially generating overlappy transaction ids leading to a potential clash. This behaviour was put in evidence by redis-benchmark which uses only 1 single key for all the requests unless the `--threads` option is passed. The PR also changes 2 other aspects: - drops the pthread_once, as it's necessary to check per thread a simple boolean can do the job and simplify the checks and the logic, and also providing a minor but nice speed improvement. - reduce the amount of spinlock traced by defaylt to reduce the amount of memory allocated, infact the vast majority of cases need just 1 spinlock tracked therefore the size of the list initialized by default has been set to the size of the smallest object that can be initialized by FFMA, 16 bytes.
- Loading branch information
1 parent
3eb32e4
commit 5ef5bf7
Showing
4 changed files
with
50 additions
and
22 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
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
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
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