Skip to content

Instantly share code, notes, and snippets.

package org.apache.ignite.internal.processors.cache.ivan;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.BrokenBarrierException;
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.TimeUnit;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheMode;
@pavlukhin
pavlukhin / hs_err_pid5763.log
Created October 31, 2018 09:35
Allocation failures
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 262144 bytes for committing reserved memory.
# Possible reasons:
# The system is out of physical RAM or swap space
# In 32 bit mode, the process size limit was hit
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
private final ConcurrentMap<Integer, ConcurrentMap<Integer, AtomicLong>> sizeDeltas = new ConcurrentHashMap<>();
// Good old approach
@Override public void accumulateSizeDelta(int cacheId, int part, long delta) {
ConcurrentMap<Integer, AtomicLong> partDeltas = sizeDeltas.get(cacheId);
if (partDeltas == null) {
ConcurrentMap<Integer, AtomicLong> partDeltas0 =
sizeDeltas.putIfAbsent(cacheId, partDeltas = new ConcurrentHashMap<>());
if (partDeltas0 != null)
partDeltas = partDeltas0;