Skip to content

Commit 525710c

Browse files
committed
Bug 37385664 - [37217844->25.03] Internal CacheStore operations can result in unsolicited commit events (main cl 112891 --> ce/main)
RQ: job.9.20241216054124.18044 [git-p4: depot-paths = "//dev/coherence-ce/main/": change = 112972]
1 parent cb0f508 commit 525710c

File tree

1 file changed

+27
-38
lines changed
  • prj/coherence-core-components/src/main/java/com/tangosol/coherence/component/util/daemon/queueProcessor/service/grid/partitionedService

1 file changed

+27
-38
lines changed

prj/coherence-core-components/src/main/java/com/tangosol/coherence/component/util/daemon/queueProcessor/service/grid/partitionedService/PartitionedCache.java

Lines changed: 27 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -20605,20 +20605,17 @@ else if (continuation != null)
2060520605

2060620606
/**
2060720607
* Raise an event (if necessary) signalling that the specified entry is
20608-
* being changed, and complete the specified continuation.
20609-
*
20610-
* Called on a worker or service thread.
20608+
* being changed, and complete the specified continuation.
20609+
* <p>
20610+
* Called on a worker or service thread.
2061120611
*/
2061220612
public void onEntryChanging(Storage.BinaryEntry binEntry, com.oracle.coherence.common.base.Continuation continuation)
2061320613
{
20614-
// import com.tangosol.net.events.partition.cache.EntryEvent$Type as com.tangosol.net.events.partition.cache.EntryEvent.Type;
20615-
// import com.tangosol.net.events.internal.StorageDispatcher as com.tangosol.net.events.internal.StorageDispatcher;
20616-
// import java.util.Collections;
20617-
20618-
com.tangosol.net.events.partition.cache.EntryEvent.Type eventType = null;
20619-
com.tangosol.net.events.internal.StorageDispatcher dispatcher = getStorageDispatcher(binEntry.getStorage());
20614+
com.tangosol.net.events.partition.cache.EntryEvent.Type eventType = null;
20615+
com.tangosol.net.events.internal.StorageDispatcher dispatcher = getStorageDispatcher(binEntry.getStorage());
20616+
2062020617
if (dispatcher != null &&
20621-
((binEntry.isValueRemoved() || ReadWriteBackingMap.BIN_ERASE_PENDING.equals(binEntry.getBinaryValue()))
20618+
(binEntry.isValueRemoved() || ReadWriteBackingMap.BIN_ERASE_PENDING.equals(binEntry.getBinaryValue())
2062220619
? dispatcher.isSubscribed(eventType = com.tangosol.net.events.partition.cache.EntryEvent.Type.REMOVING)
2062320620
: dispatcher.isSubscribed(com.tangosol.net.events.partition.cache.EntryEvent.Type.INSERTING) || dispatcher.isSubscribed(com.tangosol.net.events.partition.cache.EntryEvent.Type.UPDATING)))
2062420621
{
@@ -38685,35 +38682,24 @@ public void onUncontend(Object oContender, com.tangosol.util.SegmentedConcurrent
3868538682

3868638683
/**
3868738684
* Process the specified event that was observed from the backing-map.
38688-
* See //dev/main/doc/coherence-core/BMEHandling.txt
38689-
*
38690-
* @param evtHolder the holder for the observed BM event to be
38691-
* processed
38692-
*
38693-
* @return true iff the event's entry status does not need to be added
38694-
* to the OOB set
38685+
* See //dev/main/doc/coherence-core/BMEHandling.txt
38686+
*
38687+
* @param evtHolder the holder for the observed BM event to be
38688+
* processed
38689+
*
38690+
* @return true iff the event's entry status does not need to be added
38691+
* to the OOB set
3869538692
*/
3869638693
protected boolean processEvent(com.tangosol.internal.util.BMEventFabric.EventHolder evtHolder)
3869738694
{
38698-
// import com.tangosol.internal.util.BMEventFabric;
38699-
// import com.tangosol.internal.util.BMEventFabric$EventHolder as com.tangosol.internal.util.BMEventFabric.EventHolder;
38700-
// import com.tangosol.internal.util.BMEventFabric$EventQueue as com.tangosol.internal.util.BMEventFabric.EventQueue;
38701-
// import com.tangosol.net.cache.CacheEvent;
38702-
// import com.tangosol.net.events.partition.TransactionEvent$Type as com.tangosol.net.events.partition.TransactionEvent.Type;
38703-
// import com.tangosol.net.events.partition.UnsolicitedCommitEvent$Type as com.tangosol.net.events.partition.UnsolicitedCommitEvent.Type;
38704-
// import com.tangosol.util.Base;
38705-
// import com.tangosol.util.Binary;
38706-
// import com.tangosol.util.ExternalizableHelper as com.tangosol.util.ExternalizableHelper;
38707-
// import com.tangosol.util.MapEvent as com.tangosol.util.MapEvent;
38708-
38709-
PartitionedCache service = getService();
38710-
com.tangosol.util.MapEvent event = evtHolder.getEvent();
38711-
Storage.EntryStatus status = (Storage.EntryStatus) evtHolder.getStatus();
38712-
Storage storage = status.getStorage();
38713-
Binary binKey = (Binary) status.getKey();
38714-
boolean fOOBEvent = false;
38715-
Storage.BinaryEntry entry = null;
38716-
boolean fSynthetic = false;
38695+
PartitionedCache service = getService();
38696+
com.tangosol.util.MapEvent event = evtHolder.getEvent();
38697+
Storage.EntryStatus status = (Storage.EntryStatus) evtHolder.getStatus();
38698+
Storage storage = status.getStorage();
38699+
Binary binKey = status.getKey();
38700+
boolean fOOBEvent = false;
38701+
Storage.BinaryEntry entry = null;
38702+
boolean fSynthetic = false;
3871738703

3871838704
// attempt to lock the entry (thus make the entry managed) prior to
3871938705
// updating the index & partitioned key index
@@ -38727,11 +38713,11 @@ else if (!service.isPrimaryOwner(status.getPartition()))
3872738713
{
3872838714
// the only scenario in which this is possible is an OOB event that landed
3872938715
// on the fabric however was processed after the associated partition had
38730-
// sucessfully transferred out to another member; do not process the event
38716+
// successfully transferred out to another member; do not process the event
3873138717
// and return control suggesting it is not OOB thus will not be published
3873238718
return true;
3873338719
}
38734-
// else this is a troubling case; process the com.tangosol.util.MapEvent updating anciliary
38720+
// else this is a troubling case; process the com.tangosol.util.MapEvent updating ancillary
3873538721
// data structures
3873638722
}
3873738723

@@ -38778,6 +38764,9 @@ else if (!service.isPrimaryOwner(status.getPartition()))
3877838764
// no need to send events for updates that remove DECO_STORE
3877938765
fEvents = false;
3878038766
fIncptrs = false;
38767+
38768+
// COH-15096: don't generate the UEM events either
38769+
status.setSuppressEvents(true);
3878138770
}
3878238771

3878338772
// no need update user indices for decoration updates

0 commit comments

Comments
 (0)