Skip to content
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-14192 Do not send empty batches with IRAC #10367

Merged
merged 1 commit into from Oct 6, 2022

Conversation

pruivo
Copy link
Member

@pruivo pruivo commented Oct 4, 2022

  • Includes change to ConcurrentSmallIntSet preventing wrong constructor argument

https://issues.redhat.com/browse/ISPN-14192

Copy link
Member

@jabolina jabolina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@wburns wburns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just some minor things

@@ -178,7 +178,8 @@ public static IntSet mutableSet(int value1, int value2) {
* @return concurrent set
*/
public static IntSet concurrentSet(int maxExclusive) {
return new ConcurrentSmallIntSet(maxExclusive);
// if maxExclusive = 0; then we have an empty set
return maxExclusive < 1 ? immutableEmptySet() : new ConcurrentSmallIntSet(maxExclusive);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would personally say only return immutable empty set when maxExclusive == 0. That way we will get the new exception you added above if it is negative.

@@ -189,6 +190,10 @@ public static IntSet concurrentSet(int maxExclusive) {
* @return concurrent copy
*/
public static IntSet concurrentCopyFrom(IntSet intSet, int maxExclusive) {
// if maxExclusive = 0; then we have an empty set
if (maxExclusive < 1) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would personally say only return immutable empty set when maxExclusive == 0. That way we will get the new exception you added above if it is negative.

}
onUnexpectedThrowable(throwable);
return Completable.complete();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This slightly changes how exception handling operates. With the new changes if there is a Throwable, we now have to wait for the registered remote site backup commands to complete. Do we want that? It is probably a very small chance of this happening, but just wanted to make sure.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean the invalidState list being cleaned up now and not before?

There is no reason to keep the invalid state around more time than necessary to be cleaned up in the "next round".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not quite, If you have more than one backup if the second errors, we would have to wait until the first completes as rspCollector would have a stage dependency.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I'm setting rspCollector = null; to avoid waiting although, I think, this code will never be executed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, yes I missed that sorry. So we are good.

* Includes change to ConcurrentSmallIntSet preventing wrong constructor
  argument
Copy link
Member

@wburns wburns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wburns wburns merged commit d974287 into infinispan:main Oct 6, 2022
@pruivo pruivo deleted the t_14192 branch October 7, 2022 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants