[geode] branch develop updated (af267c0 -> d1e003c)

2020-11-05 Thread onichols
This is an automated email from the ASF dual-hosted git repository.

onichols pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git.


from af267c0  * GEODE-8652: NioSslEngine.close() Bypasses Locks (#5712)
 add d1e003c  GEODE-8603: fix StressNew for support branches (#5717)

No new revisions were added by this update.

Summary of changes:
 ci/scripts/repeat-new-tests.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[geode] branch develop updated (af267c0 -> d1e003c)

2020-11-05 Thread onichols
This is an automated email from the ASF dual-hosted git repository.

onichols pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git.


from af267c0  * GEODE-8652: NioSslEngine.close() Bypasses Locks (#5712)
 add d1e003c  GEODE-8603: fix StressNew for support branches (#5717)

No new revisions were added by this update.

Summary of changes:
 ci/scripts/repeat-new-tests.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[geode] branch develop updated (af267c0 -> d1e003c)

2020-11-05 Thread onichols
This is an automated email from the ASF dual-hosted git repository.

onichols pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git.


from af267c0  * GEODE-8652: NioSslEngine.close() Bypasses Locks (#5712)
 add d1e003c  GEODE-8603: fix StressNew for support branches (#5717)

No new revisions were added by this update.

Summary of changes:
 ci/scripts/repeat-new-tests.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[geode] branch develop updated (af267c0 -> d1e003c)

2020-11-05 Thread onichols
This is an automated email from the ASF dual-hosted git repository.

onichols pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git.


from af267c0  * GEODE-8652: NioSslEngine.close() Bypasses Locks (#5712)
 add d1e003c  GEODE-8603: fix StressNew for support branches (#5717)

No new revisions were added by this update.

Summary of changes:
 ci/scripts/repeat-new-tests.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[geode] branch develop updated: GEODE-8603: fix StressNew for support branches (#5717)

2020-11-05 Thread onichols
This is an automated email from the ASF dual-hosted git repository.

onichols pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
 new d1e003c  GEODE-8603: fix StressNew for support branches (#5717)
d1e003c is described below

commit d1e003c822463e20ce43109e6dc3f6f72a110586
Author: Owen Nichols <34043438+onichols-pivo...@users.noreply.github.com>
AuthorDate: Thu Nov 5 23:03:20 2020 -0800

GEODE-8603: fix StressNew for support branches (#5717)

* GEODE-8603: fix StressNew for support branches

* all three test compile targets are needed
---
 ci/scripts/repeat-new-tests.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ci/scripts/repeat-new-tests.sh b/ci/scripts/repeat-new-tests.sh
index dd2d220..90eb3ce 100755
--- a/ci/scripts/repeat-new-tests.sh
+++ b/ci/scripts/repeat-new-tests.sh
@@ -50,7 +50,7 @@ function save_classpath() {
   echo "Building and saving classpath"
   pushd geode >> /dev/null
 # Do this twice since devBuild still dumps a warning string to stdout.
-./gradlew --console=plain -q devBuild 2>/dev/null
+./gradlew --console=plain -q compileTestJava compileIntegrationTestJava 
compileDistributedTestJava devBuild 2>/dev/null
 ./gradlew --console=plain -q printTestClasspath 2>/dev/null 
>/tmp/classpath.txt
   popd >> /dev/null
 }



[geode] branch support/1.12 updated: GEODE-8603: Potentially expand classes identified for CI stressing to include subclasses (#5601) (#5674)

2020-11-05 Thread onichols
This is an automated email from the ASF dual-hosted git repository.

onichols pushed a commit to branch support/1.12
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/support/1.12 by this push:
 new 9b2aea9  GEODE-8603: Potentially expand classes identified for CI 
stressing to include subclasses (#5601) (#5674)
9b2aea9 is described below

commit 9b2aea942d162f6ee43e3a7bcf8e654d5fbb9d3d
Author: Jens Deppe 
AuthorDate: Tue Oct 27 06:04:00 2020 -0700

GEODE-8603: Potentially expand classes identified for CI stressing to 
include subclasses (#5601) (#5674)

- Make StressNewTestHelper create the complete gradle test task commands
- Since some tests may have subclasses in different source sets, (which
  would require a different repeat task name), it's easier for the
  command generation to all happen in the java helper rather than a
  combination of bash and java.
- Include candidate test class if it is not abstract
- Output a fake Gradle param so that scripts can determine the number of
  tests included.
- Change the CI stress job timeout from 6 to 10 hours.
- Increase the test count threshold from 25 to 35 changed tests. This
  number also includes any tests inferred by this new code.

(cherry picked from commit 4039a363a4b057bca322f29dcf33aa0664f1a912)
---
 build.gradle   |  29 +++
 ci/pipelines/shared/jinja.variables.yml|   2 +-
 ci/scripts/repeat-new-tests.sh |  54 +++---
 geode-junit/build.gradle   |   1 +
 .../geode/test/util/StressNewTestHelper.java   | 197 +
 .../geode/test/util/WhatExtendsJUnitTest.java  |  99 +++
 geode-junit/src/test/resources/expected-pom.xml|   5 +
 7 files changed, 358 insertions(+), 29 deletions(-)

diff --git a/build.gradle b/build.gradle
index efbc2c9..67fdec4 100755
--- a/build.gradle
+++ b/build.gradle
@@ -140,6 +140,35 @@ tasks.register('generate') {
   // `afterEvaluate.rootProject.generate.dependsOn(generateProto)`
 }
 
+tasks.register('printTestClasspath') {
+  group 'Build'
+  description "Print the classpath used in all tests for all subprojects"
+
+  doLast {
+Set result = new LinkedHashSet()
+// Prefer sources at the start of the classpath
+subprojects.each { sub ->
+  if (sub.hasProperty("sourceSets")) {
+sub.sourceSets.each { ss ->
+  ss.each { x ->
+x.output.classesDirs.each { y -> result.add(y) }
+  }
+}
+  }
+}
+
+subprojects.each { sub ->
+  sub.configurations.each { c ->
+if (c.name.toLowerCase().endsWith("runtimeclasspath")) {
+  c.each { f -> result.add(f) }
+}
+  }
+}
+
+println result.join(File.pathSeparator)
+  }
+}
+
 // Prompt the user for a publication passsword to sign archives or upload 
artifacts, if requested
 if (project.hasProperty('askpass')) {
   gradle.taskGraph.whenReady { taskGraph ->
diff --git a/ci/pipelines/shared/jinja.variables.yml 
b/ci/pipelines/shared/jinja.variables.yml
index 77ce929..32585b2 100644
--- a/ci/pipelines/shared/jinja.variables.yml
+++ b/ci/pipelines/shared/jinja.variables.yml
@@ -143,7 +143,7 @@ tests:
   CALL_STACK_TIMEOUT: '20700'
   CPUS: '96'
   DUNIT_PARALLEL_FORKS: '24'
-  EXECUTE_TEST_TIMEOUT: 6h
+  EXECUTE_TEST_TIMEOUT: 10h
   GRADLE_TASK: repeatTest
   PARALLEL_DUNIT: 'true'
   PARALLEL_GRADLE: 'false'
diff --git a/ci/scripts/repeat-new-tests.sh b/ci/scripts/repeat-new-tests.sh
index 4a54062..f744523 100755
--- a/ci/scripts/repeat-new-tests.sh
+++ b/ci/scripts/repeat-new-tests.sh
@@ -42,6 +42,19 @@ function changes_for_path() {
   popd >> /dev/null
 }
 
+function save_classpath() {
+  echo "Building and saving classpath"
+  pushd geode >> /dev/null
+# Do this twice since devBuild still dumps a warning string to stdout.
+./gradlew --console=plain -q devBuild 2>/dev/null
+./gradlew --console=plain -q printTestClasspath 2>/dev/null 
>/tmp/classpath.txt
+  popd >> /dev/null
+}
+
+function create_gradle_test_targets() {
+  echo $(${JAVA_HOME}/bin/java -cp $(cat /tmp/classpath.txt) 
org.apache.geode.test.util.StressNewTestHelper $@)
+}
+
 UNIT_TEST_CHANGES=$(changes_for_path '*/src/test/java') || exit $?
 INTEGRATION_TEST_CHANGES=$(changes_for_path '*/src/integrationTest/java') || 
exit $?
 DISTRIBUTED_TEST_CHANGES=$(changes_for_path '*/src/distributedTest/java') || 
exit $?
@@ -51,7 +64,7 @@ UPGRADE_TEST_CHANGES=$(changes_for_path 
'*/src/upgradeTest/java') || exit $?
 CHANGED_FILES_ARRAY=( $UNIT_TEST_CHANGES $INTEGRATION_TEST_CHANGES 
$DISTRIBUTED_TEST_CHANGES $ACCEPTANCE_TEST_CHANGES $UPGRADE_TEST_CHANGES )
 NUM_CHANGED_FILES=${#CHANGED_FILES_ARRAY[@]}
 
-echo "${NUM_CHANGED_FILES} changed tests"
+echo "${NUM_CHANGED_FILES} changed test files"
 
 if [[  "${NUM_CHANGED_FILES}" -eq 0 ]]
 then
@@ -59,36 +72,21 @@ then
   exit 0
 fi
 
-if [[ 

[geode] branch support/1.13 updated (986334e -> 61ad751)

2020-11-05 Thread onichols
This is an automated email from the ASF dual-hosted git repository.

onichols pushed a change to branch support/1.13
in repository https://gitbox.apache.org/repos/asf/geode.git.


from 986334e  Revert "GEODE-8136: Move UncheckedUtils to geode-common 
(#5123)"
 add 61ad751  GEODE-8603: Potentially expand classes identified for CI 
stressing to include subclasses (#5601) (#5674)

No new revisions were added by this update.

Summary of changes:
 build.gradle   |  29 +++
 ci/pipelines/shared/jinja.variables.yml|   2 +-
 ci/scripts/repeat-new-tests.sh |  54 +++---
 geode-junit/build.gradle   |   2 +-
 .../geode/test/util/StressNewTestHelper.java   | 197 +
 .../geode/test/util/WhatExtendsJUnitTest.java  |  99 +++
 geode-junit/src/test/resources/expected-pom.xml|   5 +
 7 files changed, 358 insertions(+), 30 deletions(-)
 create mode 100644 
geode-junit/src/main/java/org/apache/geode/test/util/StressNewTestHelper.java
 create mode 100644 
geode-junit/src/test/java/org/apache/geode/test/util/WhatExtendsJUnitTest.java



[geode] branch support/1.13 updated (986334e -> 61ad751)

2020-11-05 Thread onichols
This is an automated email from the ASF dual-hosted git repository.

onichols pushed a change to branch support/1.13
in repository https://gitbox.apache.org/repos/asf/geode.git.


from 986334e  Revert "GEODE-8136: Move UncheckedUtils to geode-common 
(#5123)"
 add 61ad751  GEODE-8603: Potentially expand classes identified for CI 
stressing to include subclasses (#5601) (#5674)

No new revisions were added by this update.

Summary of changes:
 build.gradle   |  29 +++
 ci/pipelines/shared/jinja.variables.yml|   2 +-
 ci/scripts/repeat-new-tests.sh |  54 +++---
 geode-junit/build.gradle   |   2 +-
 .../geode/test/util/StressNewTestHelper.java   | 197 +
 .../geode/test/util/WhatExtendsJUnitTest.java  |  99 +++
 geode-junit/src/test/resources/expected-pom.xml|   5 +
 7 files changed, 358 insertions(+), 30 deletions(-)
 create mode 100644 
geode-junit/src/main/java/org/apache/geode/test/util/StressNewTestHelper.java
 create mode 100644 
geode-junit/src/test/java/org/apache/geode/test/util/WhatExtendsJUnitTest.java



[geode] branch support/1.13 updated (986334e -> 61ad751)

2020-11-05 Thread onichols
This is an automated email from the ASF dual-hosted git repository.

onichols pushed a change to branch support/1.13
in repository https://gitbox.apache.org/repos/asf/geode.git.


from 986334e  Revert "GEODE-8136: Move UncheckedUtils to geode-common 
(#5123)"
 add 61ad751  GEODE-8603: Potentially expand classes identified for CI 
stressing to include subclasses (#5601) (#5674)

No new revisions were added by this update.

Summary of changes:
 build.gradle   |  29 +++
 ci/pipelines/shared/jinja.variables.yml|   2 +-
 ci/scripts/repeat-new-tests.sh |  54 +++---
 geode-junit/build.gradle   |   2 +-
 .../geode/test/util/StressNewTestHelper.java   | 197 +
 .../geode/test/util/WhatExtendsJUnitTest.java  |  99 +++
 geode-junit/src/test/resources/expected-pom.xml|   5 +
 7 files changed, 358 insertions(+), 30 deletions(-)
 create mode 100644 
geode-junit/src/main/java/org/apache/geode/test/util/StressNewTestHelper.java
 create mode 100644 
geode-junit/src/test/java/org/apache/geode/test/util/WhatExtendsJUnitTest.java



[geode] branch develop updated (9653a0b -> af267c0)

2020-11-05 Thread burcham
This is an automated email from the ASF dual-hosted git repository.

burcham pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git.


from 9653a0b  Revert "GEODE-8652: NioSslEngine.close() Bypasses Locks 
(#5666)"
 add af267c0  * GEODE-8652: NioSslEngine.close() Bypasses Locks (#5712)

No new revisions were added by this update.

Summary of changes:
 .../tcp/ConnectionCloseSSLTLSDUnitTest.java| 238 
 .../org/apache/geode/internal/tcp}/server.keystore | Bin
 ...LSocketHostNameVerificationIntegrationTest.java |   4 +-
 .../internal/net/SSLSocketIntegrationTest.java |  57 ++-
 .../apache/geode/codeAnalysis/excludedClasses.txt  |   1 +
 .../geode/internal/net/ByteBufferSharing.java  |  55 +++
 .../geode/internal/net/ByteBufferSharingImpl.java  | 168 
 .../geode/internal/net/ByteBufferSharingNoOp.java  |  52 +++
 .../org/apache/geode/internal/net/NioFilter.java   |  69 ++--
 .../apache/geode/internal/net/NioPlainEngine.java  |  27 +-
 .../apache/geode/internal/net/NioSslEngine.java| 367 -
 .../org/apache/geode/internal/tcp/Connection.java  |  34 +-
 .../org/apache/geode/internal/tcp/MsgReader.java   |  15 +-
 .../internal/net/ByteBufferConcurrencyTest.java| 165 
 .../internal/net/ByteBufferSharingImplTest.java| 179 +
 .../geode/internal/net/NioPlainEngineTest.java |  47 ++-
 .../geode/internal/net/NioSslEngineTest.java   | 432 +++--
 17 files changed, 1423 insertions(+), 487 deletions(-)
 create mode 100644 
geode-core/src/distributedTest/java/org/apache/geode/internal/tcp/ConnectionCloseSSLTLSDUnitTest.java
 copy {geode-dunit/src/main/resources/org/apache/geode => 
geode-core/src/distributedTest/resources/org/apache/geode/internal/tcp}/server.keystore
 (100%)
 create mode 100644 
geode-core/src/main/java/org/apache/geode/internal/net/ByteBufferSharing.java
 create mode 100644 
geode-core/src/main/java/org/apache/geode/internal/net/ByteBufferSharingImpl.java
 create mode 100644 
geode-core/src/main/java/org/apache/geode/internal/net/ByteBufferSharingNoOp.java
 create mode 100644 
geode-core/src/test/java/org/apache/geode/internal/net/ByteBufferConcurrencyTest.java
 create mode 100644 
geode-core/src/test/java/org/apache/geode/internal/net/ByteBufferSharingImplTest.java



[geode] branch develop updated (9653a0b -> af267c0)

2020-11-05 Thread burcham
This is an automated email from the ASF dual-hosted git repository.

burcham pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git.


from 9653a0b  Revert "GEODE-8652: NioSslEngine.close() Bypasses Locks 
(#5666)"
 add af267c0  * GEODE-8652: NioSslEngine.close() Bypasses Locks (#5712)

No new revisions were added by this update.

Summary of changes:
 .../tcp/ConnectionCloseSSLTLSDUnitTest.java| 238 
 .../org/apache/geode/internal/tcp}/server.keystore | Bin
 ...LSocketHostNameVerificationIntegrationTest.java |   4 +-
 .../internal/net/SSLSocketIntegrationTest.java |  57 ++-
 .../apache/geode/codeAnalysis/excludedClasses.txt  |   1 +
 .../geode/internal/net/ByteBufferSharing.java  |  55 +++
 .../geode/internal/net/ByteBufferSharingImpl.java  | 168 
 .../geode/internal/net/ByteBufferSharingNoOp.java  |  52 +++
 .../org/apache/geode/internal/net/NioFilter.java   |  69 ++--
 .../apache/geode/internal/net/NioPlainEngine.java  |  27 +-
 .../apache/geode/internal/net/NioSslEngine.java| 367 -
 .../org/apache/geode/internal/tcp/Connection.java  |  34 +-
 .../org/apache/geode/internal/tcp/MsgReader.java   |  15 +-
 .../internal/net/ByteBufferConcurrencyTest.java| 165 
 .../internal/net/ByteBufferSharingImplTest.java| 179 +
 .../geode/internal/net/NioPlainEngineTest.java |  47 ++-
 .../geode/internal/net/NioSslEngineTest.java   | 432 +++--
 17 files changed, 1423 insertions(+), 487 deletions(-)
 create mode 100644 
geode-core/src/distributedTest/java/org/apache/geode/internal/tcp/ConnectionCloseSSLTLSDUnitTest.java
 copy {geode-dunit/src/main/resources/org/apache/geode => 
geode-core/src/distributedTest/resources/org/apache/geode/internal/tcp}/server.keystore
 (100%)
 create mode 100644 
geode-core/src/main/java/org/apache/geode/internal/net/ByteBufferSharing.java
 create mode 100644 
geode-core/src/main/java/org/apache/geode/internal/net/ByteBufferSharingImpl.java
 create mode 100644 
geode-core/src/main/java/org/apache/geode/internal/net/ByteBufferSharingNoOp.java
 create mode 100644 
geode-core/src/test/java/org/apache/geode/internal/net/ByteBufferConcurrencyTest.java
 create mode 100644 
geode-core/src/test/java/org/apache/geode/internal/net/ByteBufferSharingImplTest.java



[geode] branch support/1.12 updated: GEODE-7727: modify sender thread to detect relese of connection (#4751)

2020-11-05 Thread zhouxj
This is an automated email from the ASF dual-hosted git repository.

zhouxj pushed a commit to branch support/1.12
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/support/1.12 by this push:
 new 798a245  GEODE-7727: modify sender thread to detect relese of 
connection (#4751)
798a245 is described below

commit 798a245147835c1e1b0026e863b9816a3ce2c551
Author: Mario Ivanac <48509724+miva...@users.noreply.github.com>
AuthorDate: Tue Mar 10 06:47:09 2020 +0100

GEODE-7727: modify sender thread to detect relese of connection (#4751)

* GEODE-7727: modify sender thread to detect relese of connection

* GEODE-7727: Update solution only for shared connections

* GEODE-7727: added test

* GEODE-7727: update ater comments

* GEODE-7727: update test

* GEODE-7727: fix for async write hanging

* GEODE-7727: Test of region operations in the face of closed connections

Adding a test for what happens to region operations when a connection is 
closed
out from under the system. This test hangs without the changes to let the
reader thread keep running.

Fix to test

* GEODE-7727: Preventing a double release of the input buffer

The releaseInputBuffer method was not thread safe. If it is called
concurrently, it will end up being released twice, which will add the 
buffer to
to the buffer pool twice. Later, this could result in two threads using the
same buffer, resulting in corruption of the buffer.

With the changes for GEODE-7727, we made it likely that releaseInputBuffer
would be called concurrently. If a member departs, one thread will call
Connection.close. Connection.close will close the socket and call
releaseInputBuffer. However, closing the socket will wake up the reader 
thread,
which will also call releaseInputBuffer concurrently.

Making releaseInputBuffer thread safe by introducing a lock.

* GEODE-7727: update after merge

* GEODE-7727: update test name

Co-authored-by: Dan Smith 
(cherry picked from commit c8413592e5573f675c538c63ef9ee9f97a349e73)
---
 .../geode/internal/tcp/CloseConnectionTest.java| 76 ++
 .../geode/internal/tcp/TCPConduitDUnitTest.java|  4 +-
 ...erStartupWhenAsyncDistributionTimeoutIsSet.java | 71 
 ...butedSystemMXBeanWithAlertsDistributedTest.java |  1 +
 .../org/apache/geode/internal/tcp/Connection.java  | 38 ---
 .../apache/geode/internal/tcp/ConnectionTable.java |  2 +-
 6 files changed, 181 insertions(+), 11 deletions(-)

diff --git 
a/geode-core/src/distributedTest/java/org/apache/geode/internal/tcp/CloseConnectionTest.java
 
b/geode-core/src/distributedTest/java/org/apache/geode/internal/tcp/CloseConnectionTest.java
new file mode 100644
index 000..154e908
--- /dev/null
+++ 
b/geode-core/src/distributedTest/java/org/apache/geode/internal/tcp/CloseConnectionTest.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.tcp;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import org.junit.Test;
+
+import org.apache.geode.cache.Region;
+import org.apache.geode.cache.RegionShortcut;
+import org.apache.geode.distributed.internal.ClusterDistributionManager;
+import org.apache.geode.distributed.internal.DistributionImpl;
+import org.apache.geode.test.dunit.VM;
+import org.apache.geode.test.dunit.cache.CacheTestCase;
+
+public class CloseConnectionTest extends CacheTestCase {
+
+  @Test(timeout = 60_000)
+  public void sharedSenderShouldRecoverFromClosedSocket() {
+VM vm0 = VM.getVM(0);
+VM vm1 = VM.getVM(1);
+
+// Create a region in each member. VM0 has a proxy region, so state must 
be in VM1
+vm0.invoke(() -> {
+  
getCache().createRegionFactory(RegionShortcut.REPLICATE_PROXY).create("region");
+});
+vm1.invoke(() -> {
+  
getCache().createRegionFactory(RegionShortcut.REPLICATE).create("region");
+});
+
+
+// Force VM1 to close it's connections.
+vm1.invoke(() -> {
+  ConnectionTable conTable = getConnectionTable();
+  

[geode] branch support/1.12 updated: GEODE-7727: modify sender thread to detect relese of connection (#4751)

2020-11-05 Thread zhouxj
This is an automated email from the ASF dual-hosted git repository.

zhouxj pushed a commit to branch support/1.12
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/support/1.12 by this push:
 new 798a245  GEODE-7727: modify sender thread to detect relese of 
connection (#4751)
798a245 is described below

commit 798a245147835c1e1b0026e863b9816a3ce2c551
Author: Mario Ivanac <48509724+miva...@users.noreply.github.com>
AuthorDate: Tue Mar 10 06:47:09 2020 +0100

GEODE-7727: modify sender thread to detect relese of connection (#4751)

* GEODE-7727: modify sender thread to detect relese of connection

* GEODE-7727: Update solution only for shared connections

* GEODE-7727: added test

* GEODE-7727: update ater comments

* GEODE-7727: update test

* GEODE-7727: fix for async write hanging

* GEODE-7727: Test of region operations in the face of closed connections

Adding a test for what happens to region operations when a connection is 
closed
out from under the system. This test hangs without the changes to let the
reader thread keep running.

Fix to test

* GEODE-7727: Preventing a double release of the input buffer

The releaseInputBuffer method was not thread safe. If it is called
concurrently, it will end up being released twice, which will add the 
buffer to
to the buffer pool twice. Later, this could result in two threads using the
same buffer, resulting in corruption of the buffer.

With the changes for GEODE-7727, we made it likely that releaseInputBuffer
would be called concurrently. If a member departs, one thread will call
Connection.close. Connection.close will close the socket and call
releaseInputBuffer. However, closing the socket will wake up the reader 
thread,
which will also call releaseInputBuffer concurrently.

Making releaseInputBuffer thread safe by introducing a lock.

* GEODE-7727: update after merge

* GEODE-7727: update test name

Co-authored-by: Dan Smith 
(cherry picked from commit c8413592e5573f675c538c63ef9ee9f97a349e73)
---
 .../geode/internal/tcp/CloseConnectionTest.java| 76 ++
 .../geode/internal/tcp/TCPConduitDUnitTest.java|  4 +-
 ...erStartupWhenAsyncDistributionTimeoutIsSet.java | 71 
 ...butedSystemMXBeanWithAlertsDistributedTest.java |  1 +
 .../org/apache/geode/internal/tcp/Connection.java  | 38 ---
 .../apache/geode/internal/tcp/ConnectionTable.java |  2 +-
 6 files changed, 181 insertions(+), 11 deletions(-)

diff --git 
a/geode-core/src/distributedTest/java/org/apache/geode/internal/tcp/CloseConnectionTest.java
 
b/geode-core/src/distributedTest/java/org/apache/geode/internal/tcp/CloseConnectionTest.java
new file mode 100644
index 000..154e908
--- /dev/null
+++ 
b/geode-core/src/distributedTest/java/org/apache/geode/internal/tcp/CloseConnectionTest.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.tcp;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import org.junit.Test;
+
+import org.apache.geode.cache.Region;
+import org.apache.geode.cache.RegionShortcut;
+import org.apache.geode.distributed.internal.ClusterDistributionManager;
+import org.apache.geode.distributed.internal.DistributionImpl;
+import org.apache.geode.test.dunit.VM;
+import org.apache.geode.test.dunit.cache.CacheTestCase;
+
+public class CloseConnectionTest extends CacheTestCase {
+
+  @Test(timeout = 60_000)
+  public void sharedSenderShouldRecoverFromClosedSocket() {
+VM vm0 = VM.getVM(0);
+VM vm1 = VM.getVM(1);
+
+// Create a region in each member. VM0 has a proxy region, so state must 
be in VM1
+vm0.invoke(() -> {
+  
getCache().createRegionFactory(RegionShortcut.REPLICATE_PROXY).create("region");
+});
+vm1.invoke(() -> {
+  
getCache().createRegionFactory(RegionShortcut.REPLICATE).create("region");
+});
+
+
+// Force VM1 to close it's connections.
+vm1.invoke(() -> {
+  ConnectionTable conTable = getConnectionTable();
+  

[geode] branch develop updated: Revert "GEODE-8652: NioSslEngine.close() Bypasses Locks (#5666)"

2020-11-05 Thread burcham
This is an automated email from the ASF dual-hosted git repository.

burcham pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
 new 9653a0b  Revert "GEODE-8652: NioSslEngine.close() Bypasses Locks 
(#5666)"
9653a0b is described below

commit 9653a0b6e490272fa77d375049f0e9f1cb6c8929
Author: Bill Burcham 
AuthorDate: Thu Nov 5 12:52:02 2020 -0800

Revert "GEODE-8652: NioSslEngine.close() Bypasses Locks (#5666)"

This reverts commit 08e9e9673d0ed0a3d74c6d16e706817cab09.
---
 .../tcp/ConnectionCloseSSLTLSDUnitTest.java| 238 
 .../org/apache/geode/internal/tcp/server.keystore  | Bin 1256 -> 0 bytes
 ...LSocketHostNameVerificationIntegrationTest.java |   4 +-
 .../internal/net/SSLSocketIntegrationTest.java |  57 +--
 .../apache/geode/codeAnalysis/excludedClasses.txt  |   1 -
 .../geode/internal/net/ByteBufferSharing.java  |  55 ---
 .../geode/internal/net/ByteBufferSharingImpl.java  | 148 ---
 .../geode/internal/net/ByteBufferSharingNoOp.java  |  52 ---
 .../org/apache/geode/internal/net/NioFilter.java   |  69 ++--
 .../apache/geode/internal/net/NioPlainEngine.java  |  27 +-
 .../apache/geode/internal/net/NioSslEngine.java| 367 +
 .../org/apache/geode/internal/tcp/Connection.java  |  34 +-
 .../org/apache/geode/internal/tcp/MsgReader.java   |  15 +-
 .../internal/net/ByteBufferSharingImplTest.java| 163 
 .../geode/internal/net/NioPlainEngineTest.java |  47 +--
 .../geode/internal/net/NioSslEngineTest.java   | 432 ++---
 16 files changed, 486 insertions(+), 1223 deletions(-)

diff --git 
a/geode-core/src/distributedTest/java/org/apache/geode/internal/tcp/ConnectionCloseSSLTLSDUnitTest.java
 
b/geode-core/src/distributedTest/java/org/apache/geode/internal/tcp/ConnectionCloseSSLTLSDUnitTest.java
deleted file mode 100644
index 77fe9bf..000
--- 
a/geode-core/src/distributedTest/java/org/apache/geode/internal/tcp/ConnectionCloseSSLTLSDUnitTest.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
- * agreements. See the NOTICE file distributed with this work for additional 
information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the 
License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software 
distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
- * or implied. See the License for the specific language governing permissions 
and limitations under
- * the License.
- */
-
-package org.apache.geode.internal.tcp;
-
-import static 
org.apache.geode.distributed.ConfigurationProperties.CONSERVE_SOCKETS;
-import static 
org.apache.geode.distributed.ConfigurationProperties.ENABLE_CLUSTER_CONFIGURATION;
-import static org.apache.geode.distributed.ConfigurationProperties.LOCATORS;
-import static org.apache.geode.distributed.ConfigurationProperties.NAME;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SOCKET_BUFFER_SIZE;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SOCKET_LEASE_TIME;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_ENABLED_COMPONENTS;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_KEYSTORE;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_KEYSTORE_PASSWORD;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_PROTOCOLS;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_REQUIRE_AUTHENTICATION;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_TRUSTSTORE;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_TRUSTSTORE_PASSWORD;
-import static 
org.apache.geode.distributed.ConfigurationProperties.USE_CLUSTER_CONFIGURATION;
-import static org.apache.geode.test.dunit.VM.getVM;
-import static 
org.apache.geode.test.util.ResourceUtils.createTempFileFromResource;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.assertj.core.api.Fail.fail;
-
-import java.io.File;
-import java.io.Serializable;
-import java.nio.ByteBuffer;
-import java.util.Properties;
-import java.util.concurrent.TimeoutException;
-
-import org.apache.logging.log4j.Logger;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.geode.cache.Cache;
-import org.apache.geode.cache.CacheFactory;
-import org.apache.geode.cache.Region;
-import 

[geode] 01/03: Revert "GEODE-8652: NioSslEngine.close() Bypasses Locks (#5666)"

2020-11-05 Thread burcham
This is an automated email from the ASF dual-hosted git repository.

burcham pushed a commit to branch support/1.13
in repository https://gitbox.apache.org/repos/asf/geode.git

commit ef74657254c2b2707a31b43af52af1734b71e961
Author: Bill Burcham 
AuthorDate: Thu Nov 5 12:28:55 2020 -0800

Revert "GEODE-8652: NioSslEngine.close() Bypasses Locks (#5666)"

This reverts commit b2af727ce23fd155f3665e3db2ecee6e8f80fba7.
---
 .../tcp/ConnectionCloseSSLTLSDUnitTest.java| 238 -
 .../org/apache/geode/internal/tcp/server.keystore  | Bin 1256 -> 0 bytes
 ...LSocketHostNameVerificationIntegrationTest.java |   4 +-
 .../internal/net/SSLSocketIntegrationTest.java |  57 ++-
 .../apache/geode/codeAnalysis/excludedClasses.txt  |   1 -
 .../geode/internal/net/ByteBufferSharing.java  |  55 ---
 .../geode/internal/net/ByteBufferSharingImpl.java  | 148 
 .../geode/internal/net/ByteBufferSharingNoOp.java  |  52 ---
 .../org/apache/geode/internal/net/NioFilter.java   |  69 ++--
 .../apache/geode/internal/net/NioPlainEngine.java  |  27 +-
 .../apache/geode/internal/net/NioSslEngine.java| 353 +--
 .../org/apache/geode/internal/tcp/Connection.java  |  34 +-
 .../org/apache/geode/internal/tcp/MsgReader.java   |  15 +-
 .../internal/net/ByteBufferSharingImplTest.java| 163 -
 .../geode/internal/net/NioPlainEngineTest.java |  47 +--
 .../geode/internal/net/NioSslEngineTest.java   | 392 ++---
 16 files changed, 460 insertions(+), 1195 deletions(-)

diff --git 
a/geode-core/src/distributedTest/java/org/apache/geode/internal/tcp/ConnectionCloseSSLTLSDUnitTest.java
 
b/geode-core/src/distributedTest/java/org/apache/geode/internal/tcp/ConnectionCloseSSLTLSDUnitTest.java
deleted file mode 100644
index 77fe9bf..000
--- 
a/geode-core/src/distributedTest/java/org/apache/geode/internal/tcp/ConnectionCloseSSLTLSDUnitTest.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
- * agreements. See the NOTICE file distributed with this work for additional 
information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the 
License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software 
distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
- * or implied. See the License for the specific language governing permissions 
and limitations under
- * the License.
- */
-
-package org.apache.geode.internal.tcp;
-
-import static 
org.apache.geode.distributed.ConfigurationProperties.CONSERVE_SOCKETS;
-import static 
org.apache.geode.distributed.ConfigurationProperties.ENABLE_CLUSTER_CONFIGURATION;
-import static org.apache.geode.distributed.ConfigurationProperties.LOCATORS;
-import static org.apache.geode.distributed.ConfigurationProperties.NAME;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SOCKET_BUFFER_SIZE;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SOCKET_LEASE_TIME;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_ENABLED_COMPONENTS;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_KEYSTORE;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_KEYSTORE_PASSWORD;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_PROTOCOLS;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_REQUIRE_AUTHENTICATION;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_TRUSTSTORE;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_TRUSTSTORE_PASSWORD;
-import static 
org.apache.geode.distributed.ConfigurationProperties.USE_CLUSTER_CONFIGURATION;
-import static org.apache.geode.test.dunit.VM.getVM;
-import static 
org.apache.geode.test.util.ResourceUtils.createTempFileFromResource;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.assertj.core.api.Fail.fail;
-
-import java.io.File;
-import java.io.Serializable;
-import java.nio.ByteBuffer;
-import java.util.Properties;
-import java.util.concurrent.TimeoutException;
-
-import org.apache.logging.log4j.Logger;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.geode.cache.Cache;
-import org.apache.geode.cache.CacheFactory;
-import org.apache.geode.cache.Region;
-import org.apache.geode.cache.RegionShortcut;
-import org.apache.geode.distributed.DistributedSystemDisconnectedException;
-import org.apache.geode.distributed.Locator;
-import 

[geode] 02/03: Revert "GEODE-8540: Create new DistributedBlackboard Rule (#5557)"

2020-11-05 Thread burcham
This is an automated email from the ASF dual-hosted git repository.

burcham pushed a commit to branch support/1.13
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 4886d2055f9cd0792694d0edb61537429a037439
Author: Bill Burcham 
AuthorDate: Thu Nov 5 12:28:55 2020 -0800

Revert "GEODE-8540: Create new DistributedBlackboard Rule (#5557)"

This reverts commit cde469c6b6955a334e6bbf22accfc0735f0c70f4.
---
 .../dunit/internal/DUnitBlackboardDUnitTest.java   |  75 +++---
 .../DistributedBlackboardDistributedTest.java  | 297 -
 .../org/apache/geode/test/dunit/Blackboard.java|  79 --
 .../apache/geode/test/dunit/DUnitBlackboard.java   |  55 ++--
 .../test/dunit/internal/InternalBlackboard.java|  33 +--
 .../dunit/internal/InternalBlackboardImpl.java |  59 ++--
 .../test/dunit/rules/DistributedBlackboard.java| 138 --
 7 files changed, 101 insertions(+), 635 deletions(-)

diff --git 
a/geode-dunit/src/distributedTest/java/org/apache/geode/test/dunit/internal/DUnitBlackboardDUnitTest.java
 
b/geode-dunit/src/distributedTest/java/org/apache/geode/test/dunit/internal/DUnitBlackboardDUnitTest.java
index 5e151d7..ae78247 100755
--- 
a/geode-dunit/src/distributedTest/java/org/apache/geode/test/dunit/internal/DUnitBlackboardDUnitTest.java
+++ 
b/geode-dunit/src/distributedTest/java/org/apache/geode/test/dunit/internal/DUnitBlackboardDUnitTest.java
@@ -14,70 +14,83 @@
  */
 package org.apache.geode.test.dunit.internal;
 
-import static java.util.concurrent.TimeUnit.SECONDS;
-import static org.apache.geode.test.dunit.VM.getVM;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.catchThrowable;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
+import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
 import org.junit.Test;
 
+import org.apache.geode.test.dunit.Host;
 import org.apache.geode.test.dunit.VM;
 
-@SuppressWarnings("serial")
-public class DUnitBlackboardDUnitTest extends JUnit4DistributedTestCase {
 
+public class DUnitBlackboardDUnitTest extends JUnit4DistributedTestCase {
   @Test
-  public void canPassDataBetweenVMs() {
+  public void canPassDataBetweenVMs() throws Exception {
 final String MBOX = "myMailbox";
-VM vm0 = getVM(0);
-VM vm1 = getVM(1);
+VM vm0 = Host.getHost(0).getVM(0);
+VM vm1 = Host.getHost(0).getVM(1);
 
 vm0.invoke("put data in mailbox", () -> getBlackboard().setMailbox(MBOX, 
"testing"));
 
-String result = vm1.invoke("get data from mailbox", () -> 
getBlackboard().getMailbox(MBOX));
+String result = (String) vm1.invoke("get data from mailbox", () -> {
+  return getBlackboard().getMailbox(MBOX);
+});
 
-assertThat(result).isEqualTo("testing");
+assertEquals("testing", result);
   }
 
   @Test
-  public void canSignalAnotherVM() {
+  public void canSignalAnotherVM() throws Exception {
 final String GATE = "myGate";
-VM vm0 = getVM(0);
-VM vm1 = getVM(1);
+VM vm0 = Host.getHost(0).getVM(0);
+VM vm1 = Host.getHost(0).getVM(1);
 
 vm1.invoke("wait on gate not yet signalled", () -> {
-  assertThat(getBlackboard().isGateSignaled(GATE)).isFalse();
-
-  Throwable thrown = catchThrowable(() -> {
-getBlackboard().waitForGate(GATE, 1, SECONDS);
-  });
-
-  assertThat(thrown).isInstanceOf(TimeoutException.class);
+  assertFalse(getBlackboard().isGateSignaled(GATE));
+  try {
+getBlackboard().waitForGate(GATE, 1, TimeUnit.SECONDS);
+  } catch (TimeoutException e) {
+// expected
+return;
+  } catch (InterruptedException e) {
+fail("unexpected interrupt");
+  }
+  fail("unexpected success");
 });
 
 vm0.invoke("signal gate", () -> getBlackboard().signalGate(GATE));
 
-vm1.invoke("wait on gate not yet signalled",
-() -> getBlackboard().waitForGate(GATE, 1, SECONDS));
+vm1.invoke("wait on gate not yet signalled", () -> {
+  try {
+getBlackboard().waitForGate(GATE, 1, TimeUnit.SECONDS);
+  } catch (TimeoutException e) {
+fail("unexpected timeout");
+  } catch (InterruptedException e) {
+fail("unexpected interrupt");
+  }
+  // success expected
+});
   }
 
   @Test
-  public void initBlackboardClearsEverything() {
+  public void initBlackboardClearsEverything() throws Exception {
 for (int i = 0; i < 100; i++) {
   getBlackboard().setMailbox("MBOX" + i, "value" + i);
-  assertThat((Object) getBlackboard().getMailbox("MBOX" + 
i)).isEqualTo("value" + i);
-
+  assertEquals("value" + i, getBlackboard().getMailbox("MBOX" + i));
   getBlackboard().signalGate("GATE" + i);
-  assertThat(getBlackboard().isGateSignaled("GATE" + i)).isTrue();
+   

[geode] 03/03: Revert "GEODE-8136: Move UncheckedUtils to geode-common (#5123)"

2020-11-05 Thread burcham
This is an automated email from the ASF dual-hosted git repository.

burcham pushed a commit to branch support/1.13
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 986334e9198a1756b839d0d13028f4a846ea29b5
Author: Bill Burcham 
AuthorDate: Thu Nov 5 12:28:55 2020 -0800

Revert "GEODE-8136: Move UncheckedUtils to geode-common (#5123)"

This reverts commit 10af7ea015ec85ef02b2e972c7a3dd3ec23bcb7f.
---
 .../geode/util/internal/UncheckedUtilsTest.java| 60 --
 .../cache/PartitionedRegionSingleHopDUnitTest.java | 14 ++---
 ...istributedRegionFunctionExecutionDUnitTest.java | 59 ++---
 ...oningWithColocationAndPersistenceDUnitTest.java | 12 ++---
 .../FunctionExecutionOnLonerRegressionTest.java| 27 --
 .../client/internal/ClientMetadataService.java |  4 +-
 .../geode/internal/cache/GemFireCacheImpl.java | 49 ++
 .../cache/InternalCacheForClientAccess.java|  6 +--
 .../apache/geode/internal/cache/LocalRegion.java   |  7 +--
 .../cache/execute/util/TypedFunctionService.java   | 37 -
 .../tier/sockets/CacheClientProxyFactory.java  |  4 +-
 .../geode/internal/cache/util}/UncheckedUtils.java | 19 +++
 .../internal/ClusterAlertMessagingTest.java|  6 +--
 .../apache/geode/internal/tcp/TCPConduitTest.java  |  4 +-
 14 files changed, 134 insertions(+), 174 deletions(-)

diff --git 
a/geode-common/src/test/java/org/apache/geode/util/internal/UncheckedUtilsTest.java
 
b/geode-common/src/test/java/org/apache/geode/util/internal/UncheckedUtilsTest.java
deleted file mode 100644
index 7c282b7..000
--- 
a/geode-common/src/test/java/org/apache/geode/util/internal/UncheckedUtilsTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
- * agreements. See the NOTICE file distributed with this work for additional 
information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the 
License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software 
distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
- * or implied. See the License for the specific language governing permissions 
and limitations under
- * the License.
- */
-package org.apache.geode.util.internal;
-
-import static org.apache.geode.util.internal.UncheckedUtils.uncheckedCast;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.catchThrowable;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.junit.Test;
-
-@SuppressWarnings("unchecked")
-public class UncheckedUtilsTest {
-
-  @Test
-  public void uncheckedCast_rawList_empty() {
-List rawList = new ArrayList();
-
-List value = uncheckedCast(rawList);
-
-assertThat(value).isSameAs(rawList);
-  }
-
-  @Test
-  public void uncheckedCast_rawList_nonEmpty() {
-List rawList = new ArrayList();
-rawList.add("1");
-rawList.add("2");
-
-List value = uncheckedCast(rawList);
-
-assertThat(value).isSameAs(rawList);
-  }
-
-  @Test
-  public void uncheckedCast_rawList_wrongTypes() {
-List rawList = new ArrayList();
-rawList.add(1);
-rawList.add(2);
-List wrongType = uncheckedCast(rawList);
-
-Throwable thrown = catchThrowable(() -> wrongType.get(0));
-
-assertThat(thrown).isInstanceOf(ClassCastException.class);
-  }
-}
diff --git 
a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionSingleHopDUnitTest.java
 
b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionSingleHopDUnitTest.java
index 43019bf..943c503 100755
--- 
a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionSingleHopDUnitTest.java
+++ 
b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionSingleHopDUnitTest.java
@@ -22,6 +22,7 @@ import static org.apache.geode.cache.RegionShortcut.PARTITION;
 import static org.apache.geode.cache.RegionShortcut.PARTITION_PERSISTENT;
 import static 
org.apache.geode.distributed.ConfigurationProperties.ENABLE_CLUSTER_CONFIGURATION;
 import static org.apache.geode.distributed.ConfigurationProperties.LOCATORS;
+import static org.apache.geode.internal.cache.util.UncheckedUtils.cast;
 import static 
org.apache.geode.internal.lang.SystemPropertyHelper.GEMFIRE_PREFIX;
 import static 
org.apache.geode.management.ManagementService.getExistingManagementService;
 import static org.apache.geode.test.awaitility.GeodeAwaitility.await;
@@ -31,7 +32,6 @@ import static org.apache.geode.test.dunit.VM.getController;
 import static 

[geode] branch support/1.13 updated (6b8f5b0 -> 986334e)

2020-11-05 Thread burcham
This is an automated email from the ASF dual-hosted git repository.

burcham pushed a change to branch support/1.13
in repository https://gitbox.apache.org/repos/asf/geode.git.


from 6b8f5b0  Revert "GEODE-8496: Bump jetty from 9.4.21.v20190926 to 
9.4.33.v20201020 (#5574)"
 new ef74657  Revert "GEODE-8652: NioSslEngine.close() Bypasses Locks 
(#5666)"
 new 4886d20  Revert "GEODE-8540: Create new DistributedBlackboard Rule 
(#5557)"
 new 986334e  Revert "GEODE-8136: Move UncheckedUtils to geode-common 
(#5123)"

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/geode/util/internal/UncheckedUtils.java |  34 --
 .../geode/util/internal/UncheckedUtilsTest.java|  60 
 .../cache/PartitionedRegionSingleHopDUnitTest.java |  14 +-
 ...istributedRegionFunctionExecutionDUnitTest.java |  59 +++-
 ...oningWithColocationAndPersistenceDUnitTest.java |  12 +-
 .../tcp/ConnectionCloseSSLTLSDUnitTest.java| 238 -
 .../org/apache/geode/internal/tcp/server.keystore  | Bin 1256 -> 0 bytes
 .../FunctionExecutionOnLonerRegressionTest.java|  27 +-
 ...LSocketHostNameVerificationIntegrationTest.java |   4 +-
 .../internal/net/SSLSocketIntegrationTest.java |  57 ++-
 .../apache/geode/codeAnalysis/excludedClasses.txt  |   1 -
 .../client/internal/ClientMetadataService.java |   4 +-
 .../geode/internal/cache/GemFireCacheImpl.java |  49 ++-
 .../cache/InternalCacheForClientAccess.java|   6 +-
 .../apache/geode/internal/cache/LocalRegion.java   |   7 +-
 .../cache/execute/util/TypedFunctionService.java   |  37 --
 .../tier/sockets/CacheClientProxyFactory.java  |   4 +-
 .../AbortBackup.java => util/UncheckedUtils.java}  |  19 +-
 .../geode/internal/net/ByteBufferSharing.java  |  55 ---
 .../geode/internal/net/ByteBufferSharingImpl.java  | 148 
 .../geode/internal/net/ByteBufferSharingNoOp.java  |  52 ---
 .../org/apache/geode/internal/net/NioFilter.java   |  69 ++--
 .../apache/geode/internal/net/NioPlainEngine.java  |  27 +-
 .../apache/geode/internal/net/NioSslEngine.java| 353 +--
 .../org/apache/geode/internal/tcp/Connection.java  |  34 +-
 .../org/apache/geode/internal/tcp/MsgReader.java   |  15 +-
 .../internal/ClusterAlertMessagingTest.java|   6 +-
 .../internal/net/ByteBufferSharingImplTest.java| 163 -
 .../geode/internal/net/NioPlainEngineTest.java |  47 +--
 .../geode/internal/net/NioSslEngineTest.java   | 392 ++---
 .../apache/geode/internal/tcp/TCPConduitTest.java  |   4 +-
 .../dunit/internal/DUnitBlackboardDUnitTest.java   |  75 ++--
 .../DistributedBlackboardDistributedTest.java  | 297 
 .../org/apache/geode/test/dunit/Blackboard.java|  79 -
 .../apache/geode/test/dunit/DUnitBlackboard.java   |  55 ++-
 .../test/dunit/internal/InternalBlackboard.java|  33 +-
 .../dunit/internal/InternalBlackboardImpl.java |  59 +---
 .../test/dunit/rules/DistributedBlackboard.java| 138 
 38 files changed, 696 insertions(+), 2037 deletions(-)
 delete mode 100644 
geode-common/src/main/java/org/apache/geode/util/internal/UncheckedUtils.java
 delete mode 100644 
geode-common/src/test/java/org/apache/geode/util/internal/UncheckedUtilsTest.java
 delete mode 100644 
geode-core/src/distributedTest/java/org/apache/geode/internal/tcp/ConnectionCloseSSLTLSDUnitTest.java
 delete mode 100644 
geode-core/src/distributedTest/resources/org/apache/geode/internal/tcp/server.keystore
 delete mode 100644 
geode-core/src/main/java/org/apache/geode/internal/cache/execute/util/TypedFunctionService.java
 copy 
geode-core/src/main/java/org/apache/geode/internal/cache/{backup/AbortBackup.java
 => util/UncheckedUtils.java} (70%)
 delete mode 100644 
geode-core/src/main/java/org/apache/geode/internal/net/ByteBufferSharing.java
 delete mode 100644 
geode-core/src/main/java/org/apache/geode/internal/net/ByteBufferSharingImpl.java
 delete mode 100644 
geode-core/src/main/java/org/apache/geode/internal/net/ByteBufferSharingNoOp.java
 delete mode 100644 
geode-core/src/test/java/org/apache/geode/internal/net/ByteBufferSharingImplTest.java
 delete mode 100644 
geode-dunit/src/distributedTest/java/org/apache/geode/test/dunit/rules/tests/DistributedBlackboardDistributedTest.java
 delete mode 100644 
geode-dunit/src/main/java/org/apache/geode/test/dunit/Blackboard.java
 delete mode 100644 
geode-dunit/src/main/java/org/apache/geode/test/dunit/rules/DistributedBlackboard.java



[geode] branch support/1.12 updated: Revert "GEODE-8652: NioSslEngine.close() Bypasses Locks (#5666)"

2020-11-05 Thread burcham
This is an automated email from the ASF dual-hosted git repository.

burcham pushed a commit to branch support/1.12
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/support/1.12 by this push:
 new bec4704  Revert "GEODE-8652: NioSslEngine.close() Bypasses Locks 
(#5666)"
bec4704 is described below

commit bec47047dec2ddb64e000b71004fbef8ed3b2b88
Author: Bill Burcham 
AuthorDate: Thu Nov 5 12:28:21 2020 -0800

Revert "GEODE-8652: NioSslEngine.close() Bypasses Locks (#5666)"

This reverts commit 06642ead279c500180f396c865b6277cb92ae27d.
---
 .../tcp/ConnectionCloseSSLTLSDUnitTest.java| 235 
 .../org/apache/geode/internal/tcp/server.keystore  | Bin 1256 -> 0 bytes
 ...LSocketHostNameVerificationIntegrationTest.java |   4 +-
 .../internal/net/SSLSocketIntegrationTest.java |  57 ++-
 .../apache/geode/codeAnalysis/excludedClasses.txt  |   1 -
 .../geode/internal/net/ByteBufferSharing.java  |  55 ---
 .../geode/internal/net/ByteBufferSharingImpl.java  | 148 
 .../geode/internal/net/ByteBufferSharingNoOp.java  |  52 ---
 .../org/apache/geode/internal/net/NioFilter.java   |  69 ++--
 .../apache/geode/internal/net/NioPlainEngine.java  |  27 +-
 .../apache/geode/internal/net/NioSslEngine.java| 357 +-
 .../org/apache/geode/internal/tcp/Connection.java  |  34 +-
 .../org/apache/geode/internal/tcp/MsgReader.java   |  15 +-
 .../internal/net/ByteBufferSharingImplTest.java| 163 -
 .../geode/internal/net/NioPlainEngineTest.java |  47 +--
 .../geode/internal/net/NioSslEngineTest.java   | 397 ++---
 16 files changed, 462 insertions(+), 1199 deletions(-)

diff --git 
a/geode-core/src/distributedTest/java/org/apache/geode/internal/tcp/ConnectionCloseSSLTLSDUnitTest.java
 
b/geode-core/src/distributedTest/java/org/apache/geode/internal/tcp/ConnectionCloseSSLTLSDUnitTest.java
deleted file mode 100644
index 586cd53..000
--- 
a/geode-core/src/distributedTest/java/org/apache/geode/internal/tcp/ConnectionCloseSSLTLSDUnitTest.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
- * agreements. See the NOTICE file distributed with this work for additional 
information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the 
License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software 
distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
- * or implied. See the License for the specific language governing permissions 
and limitations under
- * the License.
- */
-
-package org.apache.geode.internal.tcp;
-
-import static java.util.concurrent.TimeUnit.MINUTES;
-import static 
org.apache.geode.distributed.ConfigurationProperties.CONSERVE_SOCKETS;
-import static 
org.apache.geode.distributed.ConfigurationProperties.ENABLE_CLUSTER_CONFIGURATION;
-import static org.apache.geode.distributed.ConfigurationProperties.LOCATORS;
-import static org.apache.geode.distributed.ConfigurationProperties.NAME;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SOCKET_BUFFER_SIZE;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SOCKET_LEASE_TIME;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_ENABLED_COMPONENTS;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_KEYSTORE;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_KEYSTORE_PASSWORD;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_PROTOCOLS;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_REQUIRE_AUTHENTICATION;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_TRUSTSTORE;
-import static 
org.apache.geode.distributed.ConfigurationProperties.SSL_TRUSTSTORE_PASSWORD;
-import static 
org.apache.geode.distributed.ConfigurationProperties.USE_CLUSTER_CONFIGURATION;
-import static org.apache.geode.test.dunit.VM.getVM;
-import static 
org.apache.geode.test.dunit.internal.JUnit4DistributedTestCase.getBlackboard;
-import static 
org.apache.geode.test.util.ResourceUtils.createTempFileFromResource;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.assertj.core.api.Fail.fail;
-
-import java.io.File;
-import java.io.Serializable;
-import java.nio.ByteBuffer;
-import java.util.Properties;
-import java.util.concurrent.TimeoutException;
-
-import org.apache.logging.log4j.Logger;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;

[geode] branch revert-5693-backport-1-13-GEODE-8652-and-friends created (now ba3b156)

2020-11-05 Thread burcham
This is an automated email from the ASF dual-hosted git repository.

burcham pushed a change to branch 
revert-5693-backport-1-13-GEODE-8652-and-friends
in repository https://gitbox.apache.org/repos/asf/geode.git.


  at ba3b156  Revert "GEODE-8136: Move UncheckedUtils to geode-common 
(#5123)"

No new revisions were added by this update.



[geode] branch revert-5693-backport-1-13-GEODE-8652-and-friends created (now ba3b156)

2020-11-05 Thread burcham
This is an automated email from the ASF dual-hosted git repository.

burcham pushed a change to branch 
revert-5693-backport-1-13-GEODE-8652-and-friends
in repository https://gitbox.apache.org/repos/asf/geode.git.


  at ba3b156  Revert "GEODE-8136: Move UncheckedUtils to geode-common 
(#5123)"

No new revisions were added by this update.



[geode] branch revert-5694-backport-1-12-GEODE-8652-and-friends created (now 9ef2718)

2020-11-05 Thread burcham
This is an automated email from the ASF dual-hosted git repository.

burcham pushed a change to branch 
revert-5694-backport-1-12-GEODE-8652-and-friends
in repository https://gitbox.apache.org/repos/asf/geode.git.


  at 9ef2718  Revert "GEODE-8652: NioSslEngine.close() Bypasses Locks 
(#5666)"

No new revisions were added by this update.



[geode] branch revert-5694-backport-1-12-GEODE-8652-and-friends created (now 9ef2718)

2020-11-05 Thread burcham
This is an automated email from the ASF dual-hosted git repository.

burcham pushed a change to branch 
revert-5694-backport-1-12-GEODE-8652-and-friends
in repository https://gitbox.apache.org/repos/asf/geode.git.


  at 9ef2718  Revert "GEODE-8652: NioSslEngine.close() Bypasses Locks 
(#5666)"

No new revisions were added by this update.



[geode] branch develop updated: GEODE-8547: Added impacts to show missing disk-stores (#5567)

2020-11-05 Thread mivanac
This is an automated email from the ASF dual-hosted git repository.

mivanac pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
 new 7cc14ee  GEODE-8547: Added impacts to show missing disk-stores (#5567)
7cc14ee is described below

commit 7cc14eef52e06fe1e8c56bd766df56297b9c9ff8
Author: Mario Ivanac <48509724+miva...@users.noreply.github.com>
AuthorDate: Thu Nov 5 11:06:06 2020 +0100

GEODE-8547: Added impacts to show missing disk-stores (#5567)

* GEODE-8547: Added impacts to show missing disk-stores

* GEODE-8547: Added DUnit test

* GEODE-8547: update after comments

* GEODE-8547: remove unused variables

* GEODE-8547: update test
---
 .../ShowMissingDiskStoreCommandDUnitTest.java  | 57 ++
 .../cli/commands/ShowMissingDiskStoreCommand.java  | 16 +++---
 2 files changed, 65 insertions(+), 8 deletions(-)

diff --git 
a/geode-gfsh/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/ShowMissingDiskStoreCommandDUnitTest.java
 
b/geode-gfsh/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/ShowMissingDiskStoreCommandDUnitTest.java
index 254bd3c..160b92d 100644
--- 
a/geode-gfsh/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/ShowMissingDiskStoreCommandDUnitTest.java
+++ 
b/geode-gfsh/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/ShowMissingDiskStoreCommandDUnitTest.java
@@ -28,15 +28,18 @@ import org.junit.rules.TestName;
 import org.apache.geode.cache.CacheFactory;
 import org.apache.geode.cache.Region;
 import org.apache.geode.cache.RegionShortcut;
+import org.apache.geode.distributed.DistributedSystemDisconnectedException;
 import org.apache.geode.management.internal.cli.result.CommandResult;
 import org.apache.geode.management.internal.cli.result.model.ResultModel;
 import 
org.apache.geode.management.internal.cli.result.model.TabularResultModel;
 import org.apache.geode.management.internal.cli.util.CommandStringBuilder;
 import org.apache.geode.management.internal.i18n.CliStrings;
+import org.apache.geode.test.dunit.IgnoredException;
 import org.apache.geode.test.dunit.rules.ClusterStartupRule;
 import org.apache.geode.test.dunit.rules.MemberVM;
 import org.apache.geode.test.junit.categories.PersistenceTest;
 import org.apache.geode.test.junit.rules.GfshCommandRule;
+import org.apache.geode.test.junit.rules.LocatorStarterRule;
 
 @Category({PersistenceTest.class})
 public class ShowMissingDiskStoreCommandDUnitTest {
@@ -61,6 +64,7 @@ public class ShowMissingDiskStoreCommandDUnitTest {
 // start a server so that we can execute data commands that requires at 
least a server running
   }
 
+
   @Test
   public void showMissingDiskStoresDoesNotDuplicateDiskStores() {
 MemberVM server1 = lsRule.startServerVM(1, locator.getPort());
@@ -156,6 +160,59 @@ public class ShowMissingDiskStoreCommandDUnitTest {
 assertThat(missingDiskStoreIds).isNull();
   }
 
+
+  @Test
+  public void stopAllMembersAndStart2ndLocator() throws Exception {
+
IgnoredException.addIgnoredException(DistributedSystemDisconnectedException.class);
+
+MemberVM locator1 = lsRule.startLocatorVM(1, locator.getPort());
+
+lsRule.startServerVM(2, locator.getPort(), locator1.getPort());
+lsRule.startServerVM(3, locator.getPort(), locator1.getPort());
+
+final String testRegionName = "regionA";
+
+CommandStringBuilder createRegion = new 
CommandStringBuilder(CliStrings.CREATE_REGION)
+.addOption(CliStrings.CREATE_REGION__REGION, testRegionName)
+.addOption(CliStrings.CREATE_REGION__REGIONSHORTCUT,
+RegionShortcut.PARTITION_REDUNDANT.toString());
+await().untilAsserted(() -> 
gfshConnector.executeAndAssertThat(createRegion.getCommandString())
+.statusIsSuccess());
+
+// stop locator1 before locator0
+lsRule.stop(1, false);
+
+lsRule.stop(2, false);
+
+lsRule.stop(0, false);
+
+lsRule.stop(3, false);
+final int locatorPort = locator1.getPort();
+
+// start stale locator
+locator1.invokeAsync("restart locator in vm1", () -> {
+  LocatorStarterRule locatorStarter = new LocatorStarterRule();
+  locatorStarter.withName("locator-1");
+  locatorStarter.withPort(locatorPort);
+  locatorStarter.withAutoStart();
+  locatorStarter.before();
+});
+
+await().untilAsserted(() -> gfshConnector.connectAndVerify(locator1));
+
+// execute show missing-disk-stores
+await().untilAsserted(() -> {
+  CommandStringBuilder csb1 = new 
CommandStringBuilder(CliStrings.SHOW_MISSING_DISK_STORE);
+  @SuppressWarnings("deprecation")
+  CommandResult commandResult = 
gfshConnector.executeCommand(csb1.getCommandString());
+  ResultModel result = commandResult.getResultData();
+  TabularResultModel tableSection =