use of org.apache.geode.internal.cache.PutAllPartialResultException.PutAllPartialResult in project geode by apache.
the class PutAllOp method execute.
/**
* Does a region put on a server using connections from the given pool to communicate with the
* server.
*
* @param pool the pool to use to communicate with the server.
* @param region the name of the region to do the putAll on
* @param map the Map of keys and values to put
* @param eventId the event id for this putAll
*/
public static VersionedObjectList execute(ExecutablePool pool, Region region, Map map, EventID eventId, boolean skipCallbacks, int retryAttempts, Object callbackArg) {
ClientMetadataService cms = ((LocalRegion) region).getCache().getClientMetadataService();
Map<ServerLocation, HashSet> serverToFilterMap = cms.getServerToFilterMap(map.keySet(), region, true);
if (serverToFilterMap == null || serverToFilterMap.isEmpty()) {
AbstractOp op = new PutAllOpImpl(region, map, eventId, ((PoolImpl) pool).getPRSingleHopEnabled(), skipCallbacks, callbackArg);
op.initMessagePart();
return (VersionedObjectList) pool.execute(op);
}
List callableTasks = constructAndGetPutAllTasks(region, map, eventId, skipCallbacks, serverToFilterMap, (PoolImpl) pool, callbackArg);
final boolean isDebugEnabled = logger.isDebugEnabled();
if (isDebugEnabled) {
logger.debug("PutAllOp#execute : Number of putAll tasks is : {}", callableTasks.size());
}
HashMap<ServerLocation, RuntimeException> failedServers = new HashMap<ServerLocation, RuntimeException>();
PutAllPartialResult result = new PutAllPartialResult(map.size());
try {
Map<ServerLocation, Object> results = SingleHopClientExecutor.submitBulkOp(callableTasks, cms, (LocalRegion) region, failedServers);
for (Map.Entry<ServerLocation, Object> entry : results.entrySet()) {
Object value = entry.getValue();
if (value instanceof PutAllPartialResultException) {
PutAllPartialResultException pap = (PutAllPartialResultException) value;
if (isDebugEnabled) {
logger.debug("PutAll SingleHop encountered PutAllPartialResultException exception: {}, failedServers are {}", pap, failedServers.keySet());
}
result.consolidate(pap.getResult());
} else {
if (value != null) {
VersionedObjectList list = (VersionedObjectList) value;
result.addKeysAndVersions(list);
}
}
}
} catch (RuntimeException ex) {
if (isDebugEnabled) {
logger.debug("single-hop putAll encountered unexpected exception: ", ex);
}
throw ex;
}
if (!failedServers.isEmpty()) {
if (retryAttempts == 0) {
throw failedServers.values().iterator().next();
}
// add them to the partial result set
if (result.getSucceededKeysAndVersions().size() == 0) {
// if there're failed servers, we need to save the succeed keys in submitPutAll
// if retry succeeded, everything is ok, otherwise, the saved "succeeded
// keys" should be consolidated into PutAllPartialResultException
// succeedKeySet is used to send back to client in PartialResult case
// so it's not a must to use LinkedHashSet
Set succeedKeySet = new LinkedHashSet();
Set<ServerLocation> serverSet = serverToFilterMap.keySet();
for (ServerLocation server : serverSet) {
if (!failedServers.containsKey(server)) {
succeedKeySet.addAll(serverToFilterMap.get(server));
}
}
// save succeedKeys, but if retries all succeeded, discard the PutAllPartialResult
result.addKeys(succeedKeySet);
}
// send maps for the failed servers one by one instead of merging
// them into one big map. The reason is, we have to keep the same event
// ids for each sub map. There is a unit test in PutAllCSDUnitTest for
// the otherwise case.
boolean oneSubMapRetryFailed = false;
Set<ServerLocation> failedServerSet = failedServers.keySet();
for (ServerLocation failedServer : failedServerSet) {
// Throwable failedServers.values().iterator().next();
RuntimeException savedRTE = failedServers.get(failedServer);
if (savedRTE instanceof PutAllPartialResultException) {
// will not retry for PutAllPartialResultException
// but it means at least one sub map ever failed
oneSubMapRetryFailed = true;
continue;
}
Map newMap = new LinkedHashMap();
Set keySet = serverToFilterMap.get(failedServer);
for (Object key : keySet) {
newMap.put(key, map.get(key));
}
try {
VersionedObjectList v = PutAllOp.execute(pool, region, newMap, eventId, skipCallbacks, true, callbackArg);
if (v == null) {
result.addKeys(keySet);
} else {
result.addKeysAndVersions(v);
}
} catch (PutAllPartialResultException pre) {
oneSubMapRetryFailed = true;
if (logger.isDebugEnabled()) {
logger.debug("Retry failed with PutAllPartialResultException: {} Before retry: {}", pre, result.getKeyListString());
}
result.consolidate(pre.getResult());
} catch (Exception rte) {
oneSubMapRetryFailed = true;
Object firstKey = newMap.keySet().iterator().next();
result.saveFailedKey(firstKey, rte);
}
}
// If all retries succeeded, the PRE in first tries can be ignored
if (oneSubMapRetryFailed && result.hasFailure()) {
PutAllPartialResultException pre = new PutAllPartialResultException(result);
throw pre;
}
}
return result.getSucceededKeysAndVersions();
}
use of org.apache.geode.internal.cache.PutAllPartialResultException.PutAllPartialResult in project geode by apache.
the class PartitionedRegion method postRemoveAllSend.
@Override
public long postRemoveAllSend(DistributedRemoveAllOperation op, VersionedObjectList successfulOps) {
final boolean isDebugEnabled = logger.isDebugEnabled();
if (cache.isCacheAtShutdownAll()) {
throw new CacheClosedException("Cache is shutting down");
}
final long startTime = PartitionedRegionStats.startTime();
// build all the msgs by bucketid
HashMap<Integer, RemoveAllPRMessage> prMsgMap = op.createPRMessages();
PutAllPartialResult partialKeys = new PutAllPartialResult(op.removeAllDataSize);
// clear the successfulOps list since we're actually doing the removes here
// and the basicRemoveAll work was just a way to build the "op" object
Map<Object, VersionTag> keyToVersionMap = new HashMap<Object, VersionTag>(successfulOps.size());
successfulOps.clearVersions();
Iterator<Map.Entry<Integer, RemoveAllPRMessage>> itor = prMsgMap.entrySet().iterator();
while (itor.hasNext()) {
Map.Entry<Integer, RemoveAllPRMessage> mapEntry = itor.next();
Integer bucketId = (Integer) mapEntry.getKey();
RemoveAllPRMessage prMsg = mapEntry.getValue();
checkReadiness();
long then = 0;
if (isDebugEnabled) {
then = System.currentTimeMillis();
}
try {
VersionedObjectList versions = sendMsgByBucket(bucketId, prMsg);
if (versions.size() > 0) {
partialKeys.addKeysAndVersions(versions);
versions.saveVersions(keyToVersionMap);
} else if (!this.concurrencyChecksEnabled) {
// no keys returned if not versioned
Set keys = prMsg.getKeys();
partialKeys.addKeys(keys);
}
} catch (PutAllPartialResultException pre) {
// sendMsgByBucket applied partial keys
if (isDebugEnabled) {
logger.debug("PR.postRemoveAll encountered BulkOpPartialResultException, ", pre);
}
partialKeys.consolidate(pre.getResult());
} catch (Exception ex) {
// If failed at other exception
if (isDebugEnabled) {
logger.debug("PR.postRemoveAll encountered exception at sendMsgByBucket, ", ex);
}
@Released EntryEventImpl firstEvent = prMsg.getFirstEvent(this);
try {
partialKeys.saveFailedKey(firstEvent.getKey(), ex);
} finally {
firstEvent.release();
}
}
if (isDebugEnabled) {
long now = System.currentTimeMillis();
if ((now - then) >= 10000) {
logger.debug("PR.sendMsgByBucket took {} ms", (now - then));
}
}
}
this.prStats.endRemoveAll(startTime);
if (!keyToVersionMap.isEmpty()) {
for (Iterator it = successfulOps.getKeys().iterator(); it.hasNext(); ) {
successfulOps.addVersion(keyToVersionMap.get(it.next()));
}
keyToVersionMap.clear();
}
if (partialKeys.hasFailure()) {
logger.info(LocalizedMessage.create(LocalizedStrings.Region_PutAll_Applied_PartialKeys_0_1, new Object[] { getFullPath(), partialKeys }));
if (op.isBridgeOperation()) {
if (partialKeys.getFailure() instanceof CancelException) {
throw (CancelException) partialKeys.getFailure();
} else {
throw new PutAllPartialResultException(partialKeys);
}
} else {
if (partialKeys.getFailure() instanceof RuntimeException) {
throw (RuntimeException) partialKeys.getFailure();
} else {
throw new RuntimeException(partialKeys.getFailure());
}
}
}
return -1;
}
use of org.apache.geode.internal.cache.PutAllPartialResultException.PutAllPartialResult in project geode by apache.
the class LocalRegion method basicRemoveAll.
VersionedObjectList basicRemoveAll(final Collection<Object> keys, final DistributedRemoveAllOperation removeAllOp, final List<VersionTag> retryVersions) {
final boolean isDebugEnabled = logger.isDebugEnabled();
final boolean isTraceEnabled = logger.isTraceEnabled();
final EntryEventImpl event = removeAllOp.getBaseEvent();
EventID eventId = event.getEventId();
if (eventId == null && generateEventID()) {
// We need to "reserve" the eventIds for the entries in map here
event.reserveNewEventId(this.cache.getDistributedSystem(), keys.size());
eventId = event.getEventId();
}
verifyRemoveAllKeys(keys);
VersionedObjectList proxyResult = null;
boolean partialResult = false;
RuntimeException runtimeException = null;
if (hasServerProxy()) {
// send message to bridge server
if (isTX()) {
TXStateProxyImpl txState = (TXStateProxyImpl) this.cache.getTxManager().getTXState();
txState.getRealDeal(null, this);
}
try {
proxyResult = getServerProxy().removeAll(keys, eventId, event.getCallbackArgument());
if (isDebugEnabled) {
logger.debug("removeAll received response from server: {}", proxyResult);
}
} catch (PutAllPartialResultException e) {
// adjust the map to only add succeeded entries, then apply the adjustedMap
proxyResult = e.getSucceededKeysAndVersions();
partialResult = true;
if (isDebugEnabled) {
logger.debug("removeAll in client encountered a BulkOpPartialResultException: {}{}. Adjusted keys are: {}", e.getMessage(), getLineSeparator(), proxyResult.getKeys());
}
Throwable txException = e.getFailure();
while (txException != null) {
if (txException instanceof TransactionException) {
runtimeException = (RuntimeException) txException;
break;
}
txException = txException.getCause();
}
if (runtimeException == null) {
runtimeException = new ServerOperationException(LocalizedStrings.Region_RemoveAll_Applied_PartialKeys_At_Server_0.toLocalizedString(getFullPath()), e.getFailure());
}
}
}
final VersionedObjectList succeeded = new VersionedObjectList(keys.size(), true, this.concurrencyChecksEnabled);
// If this is a transactional removeAll, we will not have version information as it is only
// generated at commit
// so treat transactional removeAll as if the server is not versioned.
// If we have no storage then act as if the server is not versioned.
final boolean serverIsVersioned = proxyResult != null && proxyResult.regionIsVersioned() && !isTX() && getDataPolicy().withStorage();
if (!serverIsVersioned && !partialResult) {
// since the server is not versioned and we do not have a partial result
// get rid of the proxyResult info returned by the server.
proxyResult = null;
}
lockRVVForBulkOp();
try {
try {
int size = proxyResult == null ? keys.size() : proxyResult.size();
if (isInternalRegion()) {
if (isTraceEnabled) {
logger.trace("size of removeAll result is {} keys are {} proxyResult is {}", size, keys, proxyResult);
} else {
if (isTraceEnabled) {
logger.trace("size of removeAll result is {} keys are {} proxyResult is {}", size, keys, proxyResult);
}
}
} else {
if (isTraceEnabled) {
logger.trace("size of removeAll result is {} keys are {} proxyResult is {}", size, keys, proxyResult);
}
}
final PutAllPartialResult partialKeys = new PutAllPartialResult(size);
final Iterator iterator;
final boolean isVersionedResults;
if (proxyResult != null) {
iterator = proxyResult.iterator();
isVersionedResults = true;
} else {
iterator = keys.iterator();
isVersionedResults = false;
}
// TODO: refactor this mess
Runnable task = new Runnable() {
@Override
public void run() {
int offset = 0;
VersionTagHolder tagHolder = new VersionTagHolder();
while (iterator.hasNext()) {
stopper.checkCancelInProgress(null);
tagHolder.setVersionTag(null);
Object key;
VersionTag versionTag = null;
if (isVersionedResults) {
Map.Entry mapEntry = (Map.Entry) iterator.next();
key = mapEntry.getKey();
versionTag = ((VersionedObjectList.Entry) mapEntry).getVersionTag();
if (isDebugEnabled) {
logger.debug("removeAll key {} version={}", key, versionTag);
}
if (versionTag == null) {
if (isDebugEnabled) {
logger.debug("removeAll found invalid version tag, which means the entry is not found at server for key={}.", key);
}
succeeded.addKeyAndVersion(key, null);
continue;
}
// No need for special handling here in removeAll.
// We can just remove this key from the client with versionTag set to null.
} else {
key = iterator.next();
if (isTraceEnabled) {
logger.trace("removeAll {}", key);
}
}
try {
if (serverIsVersioned) {
if (isDebugEnabled) {
logger.debug("associating version tag with {} version={}", key, versionTag);
}
// If we have received a version tag from a server, add it to the event
tagHolder.setVersionTag(versionTag);
tagHolder.setFromServer(true);
} else if (retryVersions != null) {
VersionTag versionTag1 = retryVersions.get(offset);
if (versionTag1 != null) {
// If this is a retried event, and we have a version tag for the retry,
// add it to the event.
tagHolder.setVersionTag(versionTag1);
}
}
basicEntryRemoveAll(key, removeAllOp, offset, tagHolder);
// now we must check again since the cache may have closed during
// distribution causing this process to not receive and queue the
// event for clients
stopper.checkCancelInProgress(null);
succeeded.addKeyAndVersion(key, tagHolder.getVersionTag());
} catch (Exception ex) {
partialKeys.saveFailedKey(key, ex);
}
offset++;
}
}
};
syncBulkOp(task, eventId);
if (partialKeys.hasFailure()) {
// Bug 51725: Now succeeded contains an order key list, may be missing the version tags.
// Save reference of succeeded into partialKeys. The succeeded may be modified by
// postRemoveAll() to fill in the version tags.
partialKeys.setSucceededKeysAndVersions(succeeded);
logger.info(LocalizedMessage.create(LocalizedStrings.Region_RemoveAll_Applied_PartialKeys_0_1, new Object[] { getFullPath(), partialKeys }));
if (isDebugEnabled) {
logger.debug(partialKeys.detailString());
}
if (runtimeException == null) {
// if received exception from server first, ignore local exception
if (removeAllOp.isBridgeOperation()) {
if (partialKeys.getFailure() instanceof CancelException) {
runtimeException = (RuntimeException) partialKeys.getFailure();
} else if (partialKeys.getFailure() instanceof LowMemoryException) {
// fix for #43589
throw partialKeys.getFailure();
} else {
runtimeException = new PutAllPartialResultException(partialKeys);
if (isDebugEnabled) {
logger.debug("basicRemoveAll: {}", partialKeys.detailString());
}
}
} else {
throw partialKeys.getFailure();
}
}
}
} catch (LowMemoryException lme) {
throw lme;
} catch (RuntimeException ex) {
runtimeException = ex;
} catch (Exception ex) {
runtimeException = new RuntimeException(ex);
} finally {
removeAllOp.getBaseEvent().release();
removeAllOp.freeOffHeapResources();
}
getDataView().postRemoveAll(removeAllOp, succeeded, this);
} finally {
unlockRVVForBulkOp();
}
if (runtimeException != null) {
throw runtimeException;
}
return succeeded;
}
use of org.apache.geode.internal.cache.PutAllPartialResultException.PutAllPartialResult in project geode by apache.
the class LocalRegion method basicPutAll.
// TODO: refactor basicPutAll
public VersionedObjectList basicPutAll(final Map<?, ?> map, final DistributedPutAllOperation putAllOp, final Map<Object, VersionTag> retryVersions) {
final boolean isDebugEnabled = logger.isDebugEnabled();
final EntryEventImpl event = putAllOp.getBaseEvent();
EventID eventId = event.getEventId();
if (eventId == null && generateEventID()) {
// We need to "reserve" the eventIds for the entries in map here
event.reserveNewEventId(this.cache.getDistributedSystem(), map.size());
eventId = event.getEventId();
}
verifyPutAllMap(map);
VersionedObjectList proxyResult = null;
boolean partialResult = false;
RuntimeException runtimeException = null;
if (hasServerProxy()) {
// send message to bridge server
if (isTX()) {
TXStateProxyImpl txState = (TXStateProxyImpl) this.cache.getTxManager().getTXState();
txState.getRealDeal(null, this);
}
try {
proxyResult = getServerProxy().putAll(map, eventId, !event.isGenerateCallbacks(), event.getCallbackArgument());
if (isDebugEnabled) {
logger.debug("PutAll received response from server: {}", proxyResult);
}
} catch (PutAllPartialResultException e) {
// adjust the map to only add succeeded entries, then apply the adjustedMap
proxyResult = e.getSucceededKeysAndVersions();
partialResult = true;
if (isDebugEnabled) {
logger.debug("putAll in client encountered a PutAllPartialResultException:{}{}. Adjusted keys are: {}", e.getMessage(), getLineSeparator(), proxyResult.getKeys());
}
Throwable txException = e.getFailure();
while (txException != null) {
if (txException instanceof TransactionException) {
runtimeException = (RuntimeException) txException;
break;
}
txException = txException.getCause();
}
if (runtimeException == null) {
// for cache close
runtimeException = getCancelCriterion().generateCancelledException(e.getFailure());
if (runtimeException == null) {
runtimeException = new ServerOperationException(LocalizedStrings.Region_PutAll_Applied_PartialKeys_At_Server_0.toLocalizedString(getFullPath()), e.getFailure());
}
}
}
}
final VersionedObjectList succeeded = new VersionedObjectList(map.size(), true, this.concurrencyChecksEnabled);
// if this is a transactional putAll, we will not have version information as it is only
// generated at commit
// so treat transactional putAll as if the server is not versioned
final boolean serverIsVersioned = proxyResult != null && proxyResult.regionIsVersioned() && !isTX() && this.dataPolicy != DataPolicy.EMPTY;
if (!serverIsVersioned && !partialResult) {
// we don't need server information if it isn't versioned or if the region is empty
proxyResult = null;
}
lockRVVForBulkOp();
try {
try {
int size = proxyResult == null ? map.size() : proxyResult.size();
if (isDebugEnabled) {
logger.debug("size of put result is {} maps is {} proxyResult is {}", size, map, proxyResult);
}
final PutAllPartialResult partialKeys = new PutAllPartialResult(size);
final Iterator iterator;
final boolean isVersionedResults;
if (proxyResult != null) {
iterator = proxyResult.iterator();
isVersionedResults = true;
} else {
iterator = map.entrySet().iterator();
isVersionedResults = false;
}
// TODO: refactor this mess
Runnable task = new Runnable() {
@Override
public void run() {
int offset = 0;
VersionTagHolder tagHolder = new VersionTagHolder();
while (iterator.hasNext()) {
stopper.checkCancelInProgress(null);
Map.Entry mapEntry = (Map.Entry) iterator.next();
Object key = mapEntry.getKey();
VersionTag versionTag = null;
tagHolder.setVersionTag(null);
final Object value;
boolean overwritten = false;
if (isVersionedResults) {
versionTag = ((VersionedObjectList.Entry) mapEntry).getVersionTag();
value = map.get(key);
if (isDebugEnabled) {
logger.debug("putAll key {} -> {} version={}", key, value, versionTag);
}
if (versionTag == null && serverIsVersioned && concurrencyChecksEnabled && dataPolicy.withStorage()) {
// entry since we don't know what its state should be (but the server should)
if (isDebugEnabled) {
logger.debug("server returned no version information for {}", key);
}
localDestroyNoCallbacks(key);
// to be consistent we need to fetch the current entry
get(key, event.getCallbackArgument(), false, null);
overwritten = true;
}
} else {
value = mapEntry.getValue();
if (isDebugEnabled) {
logger.debug("putAll {} -> {}", key, value);
}
}
try {
if (serverIsVersioned) {
if (isDebugEnabled) {
logger.debug("associating version tag with {} version={}", key, versionTag);
}
// If we have received a version tag from a server, add it to the event
tagHolder.setVersionTag(versionTag);
tagHolder.setFromServer(true);
} else if (retryVersions != null && retryVersions.containsKey(key)) {
// If this is a retried event, and we have a version tag for the retry,
// add it to the event.
tagHolder.setVersionTag(retryVersions.get(key));
}
if (!overwritten) {
basicEntryPutAll(key, value, putAllOp, offset, tagHolder);
}
// now we must check again since the cache may have closed during
// distribution (causing this process to not receive and queue the
// event for clients
stopper.checkCancelInProgress(null);
succeeded.addKeyAndVersion(key, tagHolder.getVersionTag());
} catch (Exception ex) {
if (isDebugEnabled) {
logger.debug("PutAll operation encountered exception for key {}", key, ex);
}
partialKeys.saveFailedKey(key, ex);
}
offset++;
}
}
};
syncBulkOp(task, eventId);
if (partialKeys.hasFailure()) {
// Bug 51725: Now succeeded contains an order key list, may be missing the version tags.
// Save reference of succeeded into partialKeys. The succeeded may be modified by
// postPutAll() to fill in the version tags.
partialKeys.setSucceededKeysAndVersions(succeeded);
logger.info(LocalizedMessage.create(LocalizedStrings.Region_PutAll_Applied_PartialKeys_0_1, new Object[] { getFullPath(), partialKeys }));
if (isDebugEnabled) {
logger.debug(partialKeys.detailString());
}
if (runtimeException == null) {
// if received exception from server first, ignore local exception
if (putAllOp.isBridgeOperation()) {
if (partialKeys.getFailure() instanceof CancelException) {
runtimeException = (RuntimeException) partialKeys.getFailure();
} else if (partialKeys.getFailure() instanceof LowMemoryException) {
// fix for #43589
throw partialKeys.getFailure();
} else {
runtimeException = new PutAllPartialResultException(partialKeys);
if (isDebugEnabled) {
logger.debug("basicPutAll:" + partialKeys.detailString());
}
}
} else {
throw partialKeys.getFailure();
}
}
}
} catch (LowMemoryException lme) {
throw lme;
} catch (RuntimeException ex) {
runtimeException = ex;
} catch (Exception ex) {
runtimeException = new RuntimeException(ex);
} finally {
putAllOp.getBaseEvent().release();
putAllOp.freeOffHeapResources();
}
getDataView().postPutAll(putAllOp, succeeded, this);
} finally {
unlockRVVForBulkOp();
}
if (runtimeException != null) {
throw runtimeException;
}
return succeeded;
}
use of org.apache.geode.internal.cache.PutAllPartialResultException.PutAllPartialResult in project geode by apache.
the class PartitionedTXRegionStub method postPutAll.
/**
* Create PutAllPRMsgs for each bucket, and send them.
*
* @param putallO DistributedPutAllOperation object.
*/
public void postPutAll(DistributedPutAllOperation putallO, VersionedObjectList successfulPuts, LocalRegion r) throws TransactionException {
if (r.getCache().isCacheAtShutdownAll()) {
throw new CacheClosedException("Cache is shutting down");
}
PartitionedRegion pr = (PartitionedRegion) r;
final long startTime = PartitionedRegionStats.startTime();
// build all the msgs by bucketid
HashMap prMsgMap = putallO.createPRMessages();
PutAllPartialResult partialKeys = new PutAllPartialResult(putallO.putAllDataSize);
// this is rebuilt by this method
successfulPuts.clear();
Iterator itor = prMsgMap.entrySet().iterator();
while (itor.hasNext()) {
Map.Entry mapEntry = (Map.Entry) itor.next();
Integer bucketId = (Integer) mapEntry.getKey();
PutAllPRMessage prMsg = (PutAllPRMessage) mapEntry.getValue();
pr.checkReadiness();
try {
VersionedObjectList versions = sendMsgByBucket(bucketId, prMsg, pr);
// prMsg.saveKeySet(partialKeys);
partialKeys.addKeysAndVersions(versions);
successfulPuts.addAll(versions);
} catch (PutAllPartialResultException pre) {
// sendMsgByBucket applied partial keys
partialKeys.consolidate(pre.getResult());
} catch (Exception ex) {
// If failed at other exception
@Released EntryEventImpl firstEvent = prMsg.getFirstEvent(pr);
try {
partialKeys.saveFailedKey(firstEvent.getKey(), ex);
} finally {
firstEvent.release();
}
}
}
pr.prStats.endPutAll(startTime);
if (partialKeys.hasFailure()) {
pr.getCache().getLoggerI18n().info(LocalizedStrings.Region_PutAll_Applied_PartialKeys_0_1, new Object[] { pr.getFullPath(), partialKeys });
if (putallO.isBridgeOperation()) {
if (partialKeys.getFailure() instanceof CancelException) {
throw (CancelException) partialKeys.getFailure();
} else {
throw new PutAllPartialResultException(partialKeys);
}
} else {
if (partialKeys.getFailure() instanceof RuntimeException) {
throw (RuntimeException) partialKeys.getFailure();
} else {
throw new RuntimeException(partialKeys.getFailure());
}
}
}
}
Aggregations