Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,6 @@
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GroupPartitionIdPairSerializer;
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.IgniteDhtDemandedPartitionsMap;
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.IgniteDhtDemandedPartitionsMapSerializer;
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.IgniteDhtPartitionCountersMap;
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.IgniteDhtPartitionCountersMapSerializer;
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.IgniteDhtPartitionHistorySuppliersMap;
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.IgniteDhtPartitionHistorySuppliersMapSerializer;
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.IgniteDhtPartitionsToReloadMap;
Expand Down Expand Up @@ -550,8 +548,6 @@ public GridIoMessageFactory(Marshaller marsh, ClassLoader clsLdr) {
new BinaryMetadataVersionInfoSerializer());
factory.register(506, CachePartitionFullCountersMap::new,
new CachePartitionFullCountersMapSerializer());
factory.register(507, IgniteDhtPartitionCountersMap::new,
new IgniteDhtPartitionCountersMapSerializer());
factory.register(508, GroupPartitionIdPair::new, new GroupPartitionIdPairSerializer());
factory.register(510, IgniteDhtPartitionHistorySuppliersMap::new,
new IgniteDhtPartitionHistorySuppliersMapSerializer());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public class GridDhtPartitionsFullMessage extends GridDhtPartitionsAbstractMessa
@Order(2)
@Compress
@GridToStringInclude
IgniteDhtPartitionCountersMap partCntrs;
Map<Integer, CachePartitionFullCountersMap> partCntrs;

/** Partitions history suppliers. */
@Order(3)
Expand Down Expand Up @@ -127,6 +127,9 @@ public class GridDhtPartitionsFullMessage extends GridDhtPartitionsAbstractMessa
@GridToStringExclude
Map<Integer, int[]> lostParts;

/** Mutex. */
private final Object mux = new Object();

/**
* Empty constructor.
*/
Expand Down Expand Up @@ -278,10 +281,13 @@ public void addFullPartitionsMap(int grpId, GridDhtPartitionFullMap fullMap, @Nu
* @param cntrMap Partition update counters.
*/
public void addPartitionUpdateCounters(int grpId, CachePartitionFullCountersMap cntrMap) {
if (partCntrs == null)
partCntrs = new IgniteDhtPartitionCountersMap();
synchronized (mux) {
if (partCntrs == null)
partCntrs = new HashMap<>();

partCntrs.putIfAbsent(grpId, cntrMap);
if (!partCntrs.containsKey(grpId))
partCntrs.put(grpId, cntrMap);
}
}

/**
Expand Down Expand Up @@ -319,7 +325,9 @@ public void addLostPartitions(int grpId, Collection<Integer> lostParts) {
* @return Partition update counters.
*/
public CachePartitionFullCountersMap partitionUpdateCounters(int grpId) {
return partCntrs == null ? null : partCntrs.get(grpId);
synchronized (mux) {
return partCntrs == null ? null : partCntrs.get(grpId);
}
}

/**
Expand Down Expand Up @@ -442,7 +450,7 @@ public void topologyVersion(AffinityTopologyVersion topVer) {
parts = new HashMap<>();

if (partCntrs == null)
partCntrs = new IgniteDhtPartitionCountersMap();
partCntrs = new HashMap<>();

if (partHistSuppliers == null)
partHistSuppliers = new IgniteDhtPartitionHistorySuppliersMap();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,6 @@ org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPre
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPreloader$2
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPreloaderAssignments
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.IgniteDhtDemandedPartitionsMap
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.IgniteDhtPartitionCountersMap
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.IgniteDhtPartitionHistorySuppliersMap
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.IgniteDhtPartitionsToReloadMap
org.apache.ignite.internal.processors.cache.distributed.dht.preloader.IgniteHistoricalIterator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,7 @@ private void checkFullMessage(GridDhtPartitionsFullMessage msg) {

assertFalse(dupPartsData.containsKey(CU.cacheId(AFF3_CACHE1)));

Map<Integer, CachePartitionFullCountersMap> partCntrs =
getFieldValue(getFieldValue(msg, "partCntrs"), "map");
Map<Integer, CachePartitionFullCountersMap> partCntrs = getFieldValue(msg, "partCntrs");

if (partCntrs != null) {
for (CachePartitionFullCountersMap cntrs : partCntrs.values()) {
Expand Down
Loading