-
Notifications
You must be signed in to change notification settings - Fork 79
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
Did release 2.17.0 break call concurrency? #206
Comments
Hi @Abdullah-l - I'm not able to replicate this; can you provide a repository/code sample of this occurring? |
Further illustrated no apparent issue here: #207 |
Hey @splittingred, I managed to reproduce it in your rake task :) I created two branches with the exact same changes
The issue is easily seen in the logs
After 2.17.0
As you can see after 2.17.0 |
@Abdullah-l can you provide more information about your working environment:
|
Ruby version - I tried 2.7, 3.0, 3.1 I'm like 99.99% sure that 2.17.0 broke it I hope you can reproduce it :) You can just checkout the two branches I linked in the previous message and run:
on each one and see the logs |
And to clarify, is this under development mode or production mode? (What does Basically the new code uses a read-write lock; any number of requests can concurrently "read", that is, access the controller - but when the controller is reloaded the lock is "write" locked and no concurrency is allowed. I'd add some logging statements to see the order of operations around reload, the write lock acquire/release and the read lock acquire release. |
Using the rake task @splittingred wrote, However the issue still occurs when I used it with rails on a staging environment. @leonid-shevtsov regarding adding logs, I didn't fully understand where to add them and what are we looking for 😅 |
yeah, here and also in lines 54-56; before the block ( hmm... perhaps what's happening is the first request locks it for reading, and then the second wants to lock it for writing and hence has to wait until the first one completes? but this should only happen in a development environment. could it be possible that you're running it in dev mode on staging? dev mode enables code reloading and possibly other things that you generally don't need or want outside of a dev environment. and looks like the fallback environment is gruf/lib/gruf/configuration.rb Lines 205 to 222 in 2a583e5
|
Closing because I gave up on this 😅 |
Please describe the issue
Hey guys @splittingred @leonid-shevtsov, check this out:
Create two RPCs
Place a log in both RPCs
Call RPC 1 then 2
On gruf 2.16.2 it behaves normally by printing both logs
On gruf 2.17.0 it does not print the log in RPC 2. The server does not acknowledge the call at all, the client keeps loading indefinitely unless I cancel RPC 1.
This blocking behaviour I suspect was introduced in #178 as it's the only PR in that release that touches threading.
The issue is reproducible on the latest version too (2.19.0)
Anything else we should know?
The text was updated successfully, but these errors were encountered: