-
Notifications
You must be signed in to change notification settings - Fork 59
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
Fix for finagle-chirper locking problem #168
Conversation
However, I hit #106 a lot locally on my MacBook. So this issue was apparently not fully resolved (cc @Fithos ). It is independent of the changes of this PR though, because I hit the problem as often on this commit and on the previous one.
The port already in use is either the master port or one of the cache ports depending on the execution. |
Can't you also drop the lock object as well? |
The |
@@ -225,12 +226,11 @@ class FinagleChirper extends RenaissanceBenchmark { | |||
class Cache(val index: Int, val service: Service[Request, Response]) | |||
extends Service[Request, Response] { | |||
val lock = new AnyRef | |||
val cache = new mutable.HashMap[String, Buf] | |||
var count = 0 | |||
val cache = new concurrent.TrieMap[String, Buf] |
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.
Technically speaking, there is a race condition in accessing the cache
, but that's probably not very important for the benchmark overall.
This solves #164. Throughput is fairly close to the previous version, but seems to be slightly better on all VMs I tested.