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

NPE in PartitionWideEntryWithPredicateOperationFactory #8622

Donnerbart opened this issue Jul 29, 2016 · 1 comment


None yet
2 participants
Copy link

commented Jul 29, 2016

There is a possible regression in the PartitionAwareOperationFactory related code. I found it when I tried to increase the missing code coverage of MultipleEntryWithPredicateOperation (which is not serialized/deserialized in any test yet).

The only way to invoke this operation remotely seems to be a bouncing member test, otherwise it is always executed locally by the operation factory. So I modified the EntryProcessorBouncingNodesTest (which enforces migrations) to use a predicate. I had to trick a bit with index creation and usage to jump into the right code paths, but eventually it worked out. Here is the test code:

The test was green but the serialization was not triggered. Maybe dead code? Then I parked that task about a month ago. In the meantime we changed the IMap.putAll() business logic to use the PartitionAwareOperationFactory, since it was not working correctly in a bouncing member scenario. We had to change a tiny bit of code in InvokeOnPartitions to get it running: (also see the discussion about this here #8310 (comment))

When I run my modified EntryProcessorBouncingNodesTest, this change results in a NPE now:

java.lang.NullPointerException: list cannot be null

    at com.hazelcast.util.Preconditions.checkNotNull(
    at com.hazelcast.util.collection.InflatableSet$Builder.<init>(
    at com.hazelcast.util.collection.InflatableSet$Builder.<init>(
    at com.hazelcast.util.collection.InflatableSet.newBuilder(
    at com.hazelcast.spi.impl.operationservice.impl.InvokeOnPartitions.retryFailedPartitions(
    at com.hazelcast.spi.impl.operationservice.impl.InvokeOnPartitions.invoke(
    at com.hazelcast.spi.impl.operationservice.impl.OperationServiceImpl.invokeOnAllPartitions(

When I revert InvokeOnPartitions to Operation operation = operationFactory.createOperation(); the test is running fine again. So we seem to break either the Index Support for Entry Processor or the IMap.putAll() logic right now, assuming that my test is not doing any stupid things.

I also could not trigger the serialization logic of MultipleEntryWithPredicateOperation, so I still don't know if this is dead code or not.

@jerrinot @ahmetmircik Could you please have a look if I wrote a stupid test or if this is a real regression?


This comment has been minimized.

Copy link

commented Aug 1, 2016

fixed by #8627

@jerrinot jerrinot closed this Aug 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.