Conversation
4550847 to
891ddc3
Compare
159d9b5 to
71eb82d
Compare
...ache-client/src/main/java/org/ehcache/clustered/client/internal/service/ConnectionState.java
Show resolved
Hide resolved
...nt/src/main/java/org/ehcache/clustered/client/internal/service/DefaultClusteringService.java
Outdated
Show resolved
Hide resolved
.../org/ehcache/clustered/client/internal/reconnect/FailedReconnectClusterTierClientEntity.java
Outdated
Show resolved
Hide resolved
.../org/ehcache/clustered/client/internal/reconnect/FailedReconnectClusterTierClientEntity.java
Outdated
Show resolved
Hide resolved
.../org/ehcache/clustered/client/internal/reconnect/FailedReconnectClusterTierClientEntity.java
Outdated
Show resolved
Hide resolved
...on-test/src/test/java/org/ehcache/clustered/reconnect/CacheStateRepositoryReconnectTest.java
Outdated
Show resolved
Hide resolved
...on-test/src/test/java/org/ehcache/clustered/reconnect/CacheStateRepositoryReconnectTest.java
Show resolved
Hide resolved
| fail(); | ||
| } catch (ExecutionException e) { | ||
| assertThat(e.getCause().getCause().getCause(), instanceOf(ReconnectInProgressException.class)); | ||
| assertThat(e.getCause().getCause().getCause().getCause(), instanceOf(ReconnectInProgressException.class)); |
There was a problem hiding this comment.
Additional exception nesting ... this is a behavior change and should be reconsidered.
| @Override | ||
| public void putFailure(K key, V value, StoreAccessException e) { | ||
| if (e.getCause() instanceof ReconnectInProgressException) { | ||
| if (e.getCause().getCause() instanceof ReconnectInProgressException || e.getCause() instanceof ReconnectInProgressException) { |
There was a problem hiding this comment.
The additional level of exception testing bothers me. Can it be avoided?
...tered/integration-test/src/test/java/org/ehcache/clustered/IterationFailureBehaviorTest.java
Show resolved
Hide resolved
chrisdennis
left a comment
There was a problem hiding this comment.
The changes to the exception handling here seem like they might be amplifying and obfuscating these changes. If we can manage to preserve much of the original exception throwing/logic I feel we'll have a smaller more trustable and reviewable changeset.
.../integration-test/src/test/java/org/ehcache/clustered/reconnect/BasicCacheReconnectTest.java
Show resolved
Hide resolved
| }); | ||
|
|
||
| getSucceededFuture.get(20000, TimeUnit.MILLISECONDS); | ||
| assertThat(getSucceededFuture::isDone, eventually().is(true)); |
There was a problem hiding this comment.
This squelches any exceptions throw by the underlying task.
There was a problem hiding this comment.
didn't get that exception will be thrown for some time since reconnection is happening in background. I changed this since it can be slow at times for reconnect to complete. Eventually will still throw the timeout exception as it waits for 1 min for the future to succeed.
There was a problem hiding this comment.
One of us is misunderstanding the other... isDone just means complete, either exceptionally or normally. If it completed exceptionally we probably want to know what the exception is.
...nt/src/main/java/org/ehcache/clustered/client/internal/service/DefaultClusteringService.java
Outdated
Show resolved
Hide resolved
Earlier flow was store -> reconnectingProxy -> commonProxy -> actualentity where exception flow was - Since I removed reconnectingProxy and introduced reconnectable entity flow has changed to - |
cba165e to
168f777
Compare
22fde53 to
3066706
Compare
|
@mobasherul-ibm please do not resolve comments you did not create -- it makes re-review considerably more difficult. If you want to keep track of items you've addressed, reply to the comment with a |
.../org/ehcache/clustered/client/internal/reconnect/FailedReconnectClusterTierClientEntity.java
Outdated
Show resolved
Hide resolved
.../org/ehcache/clustered/client/internal/reconnect/FailedReconnectClusterTierClientEntity.java
Outdated
Show resolved
Hide resolved
.../org/ehcache/clustered/client/internal/reconnect/FailedReconnectClusterTierClientEntity.java
Outdated
Show resolved
Hide resolved
.../org/ehcache/clustered/client/internal/reconnect/FailedReconnectClusterTierClientEntity.java
Outdated
Show resolved
Hide resolved
.../org/ehcache/clustered/client/internal/reconnect/FailedReconnectClusterTierClientEntity.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/ehcache/clustered/client/internal/store/SimpleClusterTierClientEntity.java
Outdated
Show resolved
Hide resolved
...hcache-client/src/test/java/org/ehcache/clustered/client/internal/service/ReconnectTest.java
Outdated
Show resolved
Hide resolved
...va/org/ehcache/clustered/client/internal/reconnect/ReconnectableClusterTierClientEntity.java
Outdated
Show resolved
Hide resolved
...tered/integration-test/src/test/java/org/ehcache/clustered/IterationFailureBehaviorTest.java
Show resolved
Hide resolved
...tered/integration-test/src/test/java/org/ehcache/clustered/IterationFailureBehaviorTest.java
Show resolved
Hide resolved
|
Still have a test failure in |
662e6bb to
d7a7a21
Compare
d7a7a21 to
6ca13df
Compare
...va/org/ehcache/clustered/client/internal/reconnect/ReconnectableClusterTierClientEntity.java
Outdated
Show resolved
Hide resolved
...tered/integration-test/src/test/java/org/ehcache/clustered/IterationFailureBehaviorTest.java
Outdated
Show resolved
Hide resolved
...va/org/ehcache/clustered/client/internal/reconnect/ReconnectableClusterTierClientEntity.java
Show resolved
Hide resolved
...va/org/ehcache/clustered/client/internal/reconnect/ReconnectableClusterTierClientEntity.java
Outdated
Show resolved
Hide resolved
...tegration-test/src/test/java/org/ehcache/clustered/reconnect/MultipleCacheReconnectTest.java
Outdated
Show resolved
Hide resolved
...tegration-test/src/test/java/org/ehcache/clustered/reconnect/MultipleCacheReconnectTest.java
Outdated
Show resolved
Hide resolved
...tegration-test/src/test/java/org/ehcache/clustered/reconnect/MultipleCacheReconnectTest.java
Show resolved
Hide resolved
| } | ||
|
|
||
| @Test | ||
| @Ignore |
There was a problem hiding this comment.
Is this being ignored with expectation for a future repair? If so, an issue number should be mentioned.
| } | ||
|
|
||
| @Test | ||
| @Ignore |
There was a problem hiding this comment.
Is this being ignored with expectation for a future repair? If so, an issue number should be mentioned.
| systemProperty 'kitInstallationPath', "$unzipKit.destinationDir/${project(':clustered:ehcache-clustered').archivesBaseName}-$project.version-kit" | ||
| // Uncomment to include client logging in console output | ||
| // testLogging.showStandardStreams = true | ||
| testLogging.showStandardStreams = true |
There was a problem hiding this comment.
will remove once approved
6ca13df to
b16d57c
Compare
b16d57c to
4210c45
Compare
| = CacheManagerBuilder.newCacheManagerBuilder() | ||
| .with(ClusteringServiceConfigurationBuilder.cluster(CLUSTER.get().getConnectionURI().resolve("/iterator-cm")) | ||
| .autoCreate(server -> server.defaultServerResource("primary-server-resource"))); | ||
| .autoCreateOnReconnect(server -> server.defaultServerResource("primary-server-resource"))); |
There was a problem hiding this comment.
I follow the logic of why this should need to be autoCreateOnReconnect... what I don't get is how we were getting away with it before. What changed?
There was a problem hiding this comment.
earlier entity were not reconnectable so there were no connection retries but now that changed thats why I changed it to ensure all connections are closed at the end of this test.
4210c45 to
abf7e59
Compare
cljohnso
left a comment
There was a problem hiding this comment.
Needs conversations with Chris and possibly some minor tweaks.
| cache2.put(0L, "secondcache"); | ||
| }); | ||
|
|
||
| assertThat(() -> putFuture1.get(5000, TimeUnit.MILLISECONDS), |
There was a problem hiding this comment.
Is this going to need an eventually to have a stable test?
| threw(Matchers.<Throwable>both(instanceOf(ExecutionException.class)) | ||
| .and(hasCause(hasCause(hasCause(hasCause(instanceOf(ReconnectInProgressException.class)))))))); | ||
|
|
||
| assertThat(() -> putFuture2.get(5000, TimeUnit.MILLISECONDS), |
There was a problem hiding this comment.
Is this going to need an eventually to have a stable test?
| cache2.put(0L, "secondValue"); | ||
| expireLease(); | ||
|
|
||
| assertThat(() -> cache1.get(0L), |
There was a problem hiding this comment.
Is it possible the reconnect succeeds before this statement runs?
|
|
||
| cacheManager.removeCache("clustered-cache1"); | ||
|
|
||
| try { |
There was a problem hiding this comment.
This would be better with the assertThat(..., threw(...)) pattern.
No description provided.