We're updating the issue view to help you get more done. 

Change operation replicated to mirror can cause NPE in certain failover scenarios

Description

Reproduction steps:
0.Write Objects.
1.Disconnect DB/Mirror
2.Do Change operation
3.Restart backup- so it will make full recovery from primary
4.Restart primary so the previous backup will become the primary.
5.Reconnect the DB/Mirror

Result:
2018-01-31 13:05:16,616 space.1 [2] SEVERE [com.gigaspaces.replication.backlog.primary-backup-reliable-async-mirror-1] - Replication [mySpace_container1_1:mySpace] group [primary-backup-reliable-async-mirror-1]: exception while iterating over the backlog file (getPacketsUnsafe), [startIndex=0 iteration=1 RedoLogStatistics [_lastKeyInRedoLog=101, _firstKeyInRedoLog=101, _size=1, _memoryPacketsCount=1, _externalStoragePacketsCount=0, _externalStorageSpaceUsed=0]]; Caused by: java.lang.NullPointerException
at com.gigaspaces.internal.transport.EntryPacketFactory.createFullPacket(EntryPacketFactory.java:79)
at com.gigaspaces.internal.cluster.node.impl.packets.data.ReplicationPacketDataConverter.convertFromChangeToUpdate(ReplicationPacketDataConverter.java:246)
at com.gigaspaces.internal.cluster.node.impl.packets.data.ReplicationPacketDataConverter.convert(ReplicationPacketDataConverter.java:113)
at com.gigaspaces.internal.cluster.node.impl.packets.data.ReplicationPacketDataProducer.convertEntryData(ReplicationPacketDataProducer.java:575)
at com.gigaspaces.internal.cluster.node.impl.packets.data.ReplicationPacketDataProducer.convertSingleEntryData(ReplicationPacketDataProducer.java:584)
at com.gigaspaces.internal.cluster.node.impl.packets.data.ReplicationPacketDataProducer.convertSingleEntryData(ReplicationPacketDataProducer.java:76)
at com.gigaspaces.internal.cluster.node.impl.groups.ReplicationChannelDataFilterHelper.filterSingleEntryDataPacket(ReplicationChannelDataFilterHelper.java:191)
at com.gigaspaces.internal.cluster.node.impl.groups.ReplicationChannelDataFilterHelper.filterPacket(ReplicationChannelDataFilterHelper.java:46)
at com.gigaspaces.internal.cluster.node.impl.backlog.AbstractSingleFileGroupBacklog.getPacketsUnsafe(AbstractSingleFileGroupBacklog.java:897)
at com.gigaspaces.internal.cluster.node.impl.backlog.multisourcesinglefile.MultiSourceSingleFileReliableAsyncGroupBacklog.getReliableAsyncPackets(MultiSourceSingleFileReliableAsyncGroupBacklog.java:264)
at com.gigaspaces.internal.cluster.node.impl.groups.reliableasync.ReliableAsyncReplicationSourceChannel.getPendingPackets(ReliableAsyncReplicationSourceChannel.java:95)
at com.gigaspaces.internal.cluster.node.impl.groups.async.AsyncReplicationSourceChannel$AsyncDispatcher.call(AsyncReplicationSourceChannel.java:246)
at com.gigaspaces.internal.cluster.node.impl.groups.async.AsyncReplicationSourceChannel$AsyncDispatcher.call(AsyncReplicationSourceChannel.java:207)
at com.gigaspaces.internal.utils.concurrent.ScheduledThreadPoolAsyncHandlerProvider$AsyncRunnableWrapper$ExecutionTask.run(ScheduledThreadPoolAsyncHandlerProvider.java:291)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Workaround

None

Acceptance Test

com.gigaspaces.test.failover.TwoFailOversWithMirrorTest

Status

Assignee

Yael Nahon

Reporter

Ester Atzmon

Labels

Priority

Medium

SalesForce Case ID

None

Fix versions

Commitment Version/s

12.3.1

Due date

None

Product

XAP

Edition

Open Source

Platform

All

Sprint

None