if (cause instanceof ConflictException) { final ConflictException ce = (ConflictException)cause; ce.setTransactionSeverity(); throw ce; if (t instanceof ConflictException) { final ConflictException ce = (ConflictException)t; ce.setTransactionSeverity(); throw ce;
/** Verify that the commit conflict string contains customer-friendly * information. Throw an error if a problem is detected. * * @param ex The commit conflict exception. */ public static void checkCommitConflictException(ConflictException ex) { String errStr = ex.toString(); if ((errStr.indexOf("REMOVED") >= 0) || (errStr.indexOf("INVALID") >= 0) || (errStr.indexOf("Deserializ") >= 0)) { throw new TestException("Test got " + errStr + ", but this error text " + "might contain GemFire internal values\n" + TestHelper.getStackTrace(ex)); } // if (errStr.indexOf("from <local invalidated> to <invalidated>") >= 0) { // throw new TestException("Should not get a conflict on a local invalidate becoming an invalidate " + // TestHelper.getStackTrace(ex)); // } }
final ConflictException ce = new ConflictException( LocalizedStrings.TX_CONFLICT_ON_OBJECT.toLocalizedString("index=" + container + "; indexKey=" + ArrayUtils.objectString(key) lockPolicy.getWriteLockMode().toString())); throw StandardException.newException( SQLState.GFXD_OPERATION_CONFLICT, ce, ce.getMessage());
+ lockObj); throw new ConflictException( LocalizedStrings.TX_CONFLICT_ON_OBJECT .toLocalizedString(getLockObjectString(msg, lockObj, mode, + Integer.toHexString(flags) + " on object: " + lockObj); throw new ConflictException( LocalizedStrings.TX_CONFLICT_LOCK_ILLEGAL.toLocalizedString( getLockObjectString(msg, lockObj, mode, context, lockOwner),
final ConflictException ce = new ConflictException( LocalizedStrings.TX_CONFLICT_ON_OBJECT.toLocalizedString("index=" + container + "; indexKey=" + ArrayUtils.objectString(key) lockPolicy.getWriteLockMode().toString())); throw StandardException.newException( SQLState.GFXD_OPERATION_CONFLICT, ce, ce.getMessage());
private void checkConflict(LocalRegion owner, EntryEventImpl event, RegionEntry re) { //TODO: Make it property based and return oldValue taken from OldREgionEntry if confict and not // throwing conflictexception if (owner.isUsedForPartitionedRegionBucket() && !((BucketRegion)owner).getBucketAdvisor().isPrimary()) { return; } // Don't do conflict detection on secondary. if (event.getTXState() != null && event.getTXState().isSnapshot()) { TXState localState = event.getTXState().getLocalTXState(); if (!firstEntry(re)) { // deltas will be merged and will not conflict if (!TXState.checkEntryInSnapshot(localState, event.getRegion(), re) && !event.hasColumnDelta()) { throw new ConflictException("The value has changed."); } } } }
final ConflictException ce = new ConflictException( LocalizedStrings.TX_CONFLICT_ON_OBJECT.toLocalizedString("index=" + container + "; indexKey=" + ArrayUtils.objectString(key) lockPolicy.getWriteLockMode().toString())); throw StandardException.newException( SQLState.GFXD_OPERATION_CONFLICT, ce, ce.getMessage());
String errStr = cce.toString(); boolean isCausedByTransactionWriterException = errStr.indexOf("intentionally throw") >= 0; if (isSerialExecution && !isCausedByTransactionWriterException) {