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
ISPN-4160 Do not allow the state transfer chunk size to be <= 0 #2496
Conversation
I'm getting a failure in ReplStateTransferCacheLoaderTest:
|
@@ -63,7 +63,7 @@ public StateTransferConfiguration timeout(long l) { | |||
|
|||
/** | |||
* If > 0, the state will be transferred in batches of {@code chunkSize} cache entries. |
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.
No need for an if here, as the chunk size must be > 0 all the time.
Looks like |
Ok, let me correct this one. Thanks Dan |
@@ -18,9 +18,13 @@ protected void createCacheManagers() throws Throwable { | |||
ConfigurationBuilder invalAsync = getDefaultClusteredCacheConfig(CacheMode.INVALIDATION_ASYNC, false); | |||
ConfigurationBuilder local = getDefaultClusteredCacheConfig(CacheMode.LOCAL, false); | |||
|
|||
invalSync.clustering().stateTransfer().fetchInMemoryState(false); | |||
invalAsync.clustering().stateTransfer().fetchInMemoryState(false); |
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.
@vblagoje Actually, would you mind removing the lines in StateTransferConfigurationBuilder that throw an exception when state transfer is enabled in invalidation mode? I added a test for state transfer in invalidation mode some time ago (NonTxStateTransferInvalidationTest), but I forgot to remove that validation.
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.
@danberindei I did, and therefore all of those clustering().stateTransfer().fetchInMemoryState(false) should be removed as well. Correct?
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.
Yep, we should leave fetchInMemoryState enabled.
BTW, I'm still seeing a failure in StateTransferCacheLoaderTest: http://ci.infinispan.org/viewLog.html?buildId=7877&buildTypeId=bt9
@danberindei forgot to mention that this one has been updated. Have a look |
@vblagoje I still see the failure in CI, in ReplStateTransferCacheLoaderTest.createBeforeMethod |
Right! Corrected, apologies. |
@danberindei ready for integration |
throw new CacheConfigurationException( | ||
"Cache cannot use INVALIDATION mode and have fetchInMemoryState set to true."); | ||
if (chunkSize <= 0) { | ||
throw new CacheConfigurationException("chunkSize can not be <= 0"); |
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.
I'd prefer exceptions such as these to use Log
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.
Sorry Tristan, too late! We'll try to keep it in mind for the next time :)
Integrated, thanks Vladimir! |
Master only. Dan should review. See discussion at https://issues.jboss.org/browse/ISPN-4160