-
Notifications
You must be signed in to change notification settings - Fork 685
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
GEODE-9204: thread hung waiting for response #6426
Conversation
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.
Approved!
@BenjaminPerryRoss @boglesby @gesterzhou @kirklund @nabarunnag @pivotal-eshu Could you please take a look at this PR? |
geode-core/src/main/java/org/apache/geode/distributed/internal/ReplyMessage.java
Outdated
Show resolved
Hide resolved
@kamilla1201 |
It is possible to have a loader on a local region in which case it would not need to be serializable. It is safer to defer the check until it is being serialized. |
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.
Don't worry of the testEventIdOutOfOrderInPartitionRegionSingleHop failure in precheckin. It will be fixed in other geode tickets: GEODE-9242, GEODE-9373.
This pull request introduces 1 alert when merging ec97322 into c9d4f68 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging c8efba6 into 2271b7f - view on LGTM.com new alerts:
|
geode-core/src/main/java/org/apache/geode/distributed/internal/ReplyMessage.java
Outdated
Show resolved
Hide resolved
@Rule | ||
public DistributedRule distributedRule = new DistributedRule(2); | ||
|
||
CacheRule cacheRule = CacheRule.builder().build(); |
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.
Need to annotate this with @Rule
or it won't be torn down between tests.
} | ||
|
||
@NotNull | ||
private SerializableRunnableIF createRegionWithBadCacheLoader(Properties properties) { |
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.
Not a request for change, just a note... I recommend not importing and using SerializableRunnableIF
. Best way to use VM.invoke with methods is to use void as the return type:
private void createRegionWithBadCacheLoader(Properties properties)
And then have the caller invoke it with a lambda:
cacheLoaderVM.invoke("create a region with a bad cache loader",
() -> createRegionWithBadCacheLoader(properties));
Need to run performance tests before merging this PR |
A not serializable exception can cause a ServerConnection thread to get stuck waiting for a reply from another member. This is caused by ReplyMessage not handling a non-serializable "returnValue". The fix is to catch and log the exception in the sending node and then handle the problem in the receiving node. I would have liked to serialize the "returnValue" field into a separate buffer so as not to transmit a partial serialization of the object but that would require an extra buffer copy for every ReplyMessage sent, and we send a lot of them.
5e4bec2
to
56d1001
Compare
This reverts commit 19f55ad.
This reverts commit 19f55ad.
This reverts commit 19f55ad.
The original PR #6392 was closed because I took over the work on this ticket.
A not serializable exception can cause a ServerConnection thread to get stuck
waiting for a reply from another member. This is caused by ReplyMessage
not handling a non-serializable "returnValue".
The fix is to catch and log the exception in the sending node and then
handle the problem in the receiving node.
I would have liked to serialize the "returnValue" field into a separate buffer
so as not to transmit a partial serialization of the object but that would require
an extra buffer copy for every ReplyMessage sent, and we send a lot of them.
Thank you for submitting a contribution to Apache Geode.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:
Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
Has your PR been rebased against the latest commit within the target branch (typically
develop
)?Is your initial contribution a single, squashed commit?
Does
gradlew build
run cleanly?Have you written or updated unit tests to verify your changes?
If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
Note:
Please ensure that once the PR is submitted, check Concourse for build issues and
submit an update to your PR as soon as possible. If you need help, please send an
email to dev@geode.apache.org.