You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2020/11/30 10:31:41 UTC
[GitHub] [geode] mkevo opened a new pull request #5777: GEODE-8472: fix list gateways command when dispatcher-threads is set …
mkevo opened a new pull request #5777:
URL: https://github.com/apache/geode/pull/5777
…to 1
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:
- [x] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
- [x] Has your PR been rebased against the latest commit within the target branch (typically `develop`)?
- [x] Is your initial contribution a single, squashed commit?
- [x] 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](http://www.apache.org/legal/resolved.html#category-a)?
### 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.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [geode] DonalEvans commented on a change in pull request #5777: GEODE-8742: fix list gateways command when dispatcher-threads is set …
Posted by GitBox <gi...@apache.org>.
DonalEvans commented on a change in pull request #5777:
URL: https://github.com/apache/geode/pull/5777#discussion_r533686032
##########
File path: geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/wancommand/ListGatewaysCommandDUnitTest.java
##########
@@ -450,6 +450,31 @@ public void testListGatewaysReceiversOnlyFalseAndSendersOnlyFalseReturnsSendersA
.hasRowSize(expectedGwReceiverSectionSize).hasColumns().contains("Port", "Member");
}
+ @Test
+ public void testListGatewaysWithOneDispatcherThread() {
+ String command =
+ "create gateway-sender --id=ln_Serial --remote-distributed-system-id=2 --dispatcher-threads=1";
+
+ int lnPort = locatorSite1.getPort();
+ int nyPort = locatorSite2.getPort();
Review comment:
This variable is never used.
##########
File path: geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/serial/SerialGatewaySenderQueueDUnitTest.java
##########
@@ -110,18 +111,18 @@ public void unprocessedTokensMapShouldDrainCompletely() throws Exception {
// Give the unprocessedTokens map time to empty
Thread.sleep(2000);
- int numUnprocessedTokensVM4 = vm4.invoke(() -> unprocessedTokensSize("ln"));
+ long numUnprocessedTokensVM4 = vm4.invoke(() -> unprocessedTokensSize("ln"));
assertThat(numUnprocessedTokensVM4).isEqualTo(0);
- int numUnprocessedTokensVM5 = vm5.invoke(() -> unprocessedTokensSize("ln"));
+ long numUnprocessedTokensVM5 = vm5.invoke(() -> unprocessedTokensSize("ln"));
assertThat(numUnprocessedTokensVM5).isEqualTo(0);
}
- private int unprocessedTokensSize(String senderId) {
+ private long unprocessedTokensSize(String senderId) {
AbstractGatewaySender sender = (AbstractGatewaySender) findGatewaySender(senderId);
- SerialGatewaySenderEventProcessor processor =
- (SerialGatewaySenderEventProcessor) sender.getEventProcessor();
- return processor.numUnprocessedEventTokens();
+ AbstractGatewaySenderEventProcessor processor =
+ sender.getEventProcessor();
+ return processor.getNumEventsDispatched();
Review comment:
It appears that the name of this method no longer matches what it's doing. The method returns the number of events dispatched, not the number of unprocessed events. This also impacts tests that use this method, since they are now asserting something different.
##########
File path: geode-wan/src/main/java/org/apache/geode/internal/cache/wan/serial/SerialGatewaySenderImpl.java
##########
@@ -117,15 +117,8 @@ private void start(boolean cleanQueues) {
}
protected AbstractGatewaySenderEventProcessor createEventProcessor(boolean cleanQueues) {
- AbstractGatewaySenderEventProcessor eventProcessor;
- if (getDispatcherThreads() > 1) {
- eventProcessor = new RemoteConcurrentSerialGatewaySenderEventProcessor(
- SerialGatewaySenderImpl.this, getThreadMonitorObj(), cleanQueues);
- } else {
- eventProcessor = new RemoteSerialGatewaySenderEventProcessor(SerialGatewaySenderImpl.this,
- getId(), getThreadMonitorObj(), cleanQueues);
- }
- return eventProcessor;
+ return new RemoteConcurrentSerialGatewaySenderEventProcessor(
+ SerialGatewaySenderImpl.this, getThreadMonitorObj(), cleanQueues);
Review comment:
Would it be possible to address the underlying problem with using `RemoteSerialGatewaySenderEventProcessor` rather than simply not using it? There appears to be an NPE thrown when calling `GatewaySenderMXBean.isConnected()` on the `GatewaySenderMXBean` proxy in `ListGatewayCommand` when `dispatcher-threads=1`, which this change does not directly address. It would be better to address the root cause of this issue if possible rather than just avoiding it, I think.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [geode] mkevo commented on pull request #5777: GEODE-8742: fix list gateways command when dispatcher-threads is set …
Posted by GitBox <gi...@apache.org>.
mkevo commented on pull request #5777:
URL: https://github.com/apache/geode/pull/5777#issuecomment-737125881
The new PR is opened [#5803](https://github.com/apache/geode/pull/5803).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [geode] DonalEvans commented on pull request #5777: GEODE-8742: fix list gateways command when dispatcher-threads is set …
Posted by GitBox <gi...@apache.org>.
DonalEvans commented on pull request #5777:
URL: https://github.com/apache/geode/pull/5777#issuecomment-735948832
It's possible that these changes may overlap/conflict with https://github.com/apache/geode/pull/5770. It could be a good idea to rebase off that branch and confirm that the issue these changes are intended to fix is still present with the above PR in place.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [geode] mkevo closed pull request #5777: GEODE-8742: fix list gateways command when dispatcher-threads is set …
Posted by GitBox <gi...@apache.org>.
mkevo closed pull request #5777:
URL: https://github.com/apache/geode/pull/5777
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [geode] mkevo commented on pull request #5777: GEODE-8742: fix list gateways command when dispatcher-threads is set …
Posted by GitBox <gi...@apache.org>.
mkevo commented on pull request #5777:
URL: https://github.com/apache/geode/pull/5777#issuecomment-736281496
> It's possible that these changes may overlap/conflict with #5770. It could be a good idea to rebase off that branch and confirm that the issue these changes are intended to fix is still present with the above PR in place.
Hi @DonalEvans ,
I tried with this PR and the issue still exist.
With this change issue dissapear.
There is some test failing, I'm trying to fix it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [geode] mkevo commented on a change in pull request #5777: GEODE-8742: fix list gateways command when dispatcher-threads is set …
Posted by GitBox <gi...@apache.org>.
mkevo commented on a change in pull request #5777:
URL: https://github.com/apache/geode/pull/5777#discussion_r533977672
##########
File path: geode-wan/src/main/java/org/apache/geode/internal/cache/wan/serial/SerialGatewaySenderImpl.java
##########
@@ -117,15 +117,8 @@ private void start(boolean cleanQueues) {
}
protected AbstractGatewaySenderEventProcessor createEventProcessor(boolean cleanQueues) {
- AbstractGatewaySenderEventProcessor eventProcessor;
- if (getDispatcherThreads() > 1) {
- eventProcessor = new RemoteConcurrentSerialGatewaySenderEventProcessor(
- SerialGatewaySenderImpl.this, getThreadMonitorObj(), cleanQueues);
- } else {
- eventProcessor = new RemoteSerialGatewaySenderEventProcessor(SerialGatewaySenderImpl.this,
- getId(), getThreadMonitorObj(), cleanQueues);
- }
- return eventProcessor;
+ return new RemoteConcurrentSerialGatewaySenderEventProcessor(
+ SerialGatewaySenderImpl.this, getThreadMonitorObj(), cleanQueues);
Review comment:
Hi @DonalEvans ,
I agree with you, I will close this PR and open a new one with new fix.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org