internal void TestCommitClash(TableInfo tableInfo, TableEventRegistry journal) { lock (this) { // Very nasty search here... foreach (var rowEvent in events.OfType <TableRowEvent>()) { if (rowEvent.EventType == TableRowEventType.Remove) { var rowNum = rowEvent.RowNumber; foreach (var otherRowEvent in journal.events.OfType <TableRowEvent>()) { if (otherRowEvent.RowNumber == rowNum && otherRowEvent.EventType == TableRowEventType.Remove) { throw new RowRemoveConflictException(tableInfo.TableName, new RowId(tableInfo.Id, rowNum)); } } } } } }
internal void TestCommitClash(TableInfo tableInfo, TableEventRegistry journal) { lock (this) { // Very nasty search here... foreach (var rowEvent in events.OfType <TableRowEvent>()) { if (rowEvent.EventType == TableRowEventType.Remove) { var rowNum = rowEvent.RowNumber; foreach (var otherRowEvent in journal.events.OfType <TableRowEvent>()) { if (otherRowEvent.RowNumber == rowNum && otherRowEvent.EventType == TableRowEventType.Remove) { throw new TransactionException(TransactionErrorCodes.RowRemoveClash, String.Format("Concurrent Serializable Transaction Conflict(1): " + "Current row remove clash ( row: {0}, table: {1})", rowNum, tableInfo.TableName)); } } } } } }