Questions tagged [transaction-isolation]

Transaction isolation relates to the visibility and impact of changes made in one transaction on concurrent transactions.

256 questions
3
votes
1 answer

Best way to retry a transaction with Seam & Hibernate

I've got a Seam web application working with Seam & Hibernate (JDBC to SQLServer). It's working well, but under heavy load (stress test with JMeter), I have some LockAcquisitionException or OptimisticLockException. The LockAquisitionException is…
Anthony O.
  • 22,041
  • 18
  • 107
  • 163
3
votes
2 answers

Does Serializable isolation level protect databases against ACIDRain attack?

ACIDRain attack paper by Todd Warszawski, Peter Bailis. A high-level overview blogpost on this paper. Many applications were found to be vulnerable to this, eg. WooCommerce, Opencart. There are two types of anomaly that ACIDRain attacks could…
netok
  • 181
  • 3
  • 9
3
votes
2 answers

Does Amazon Aurora offer serializable isolation for read-only transaction running on slave nodes?

From what I understand from reading Amazon aurora documentation, even if Aurora master node synchronously write the WAL log to 4 of 6 storage nodes. Unless there is switch of master, the Aurora slave are only kept in sync using asynchronous log…
3
votes
0 answers

Does Row Locks still exist after a deadlock?

So In this image my teacher wrote in red that after the deadlock appeared the transaction1 is able to set x-lock and load the old data. But after I tried it in SQL I have to wait because apparently the transaction2 still has seted the rowlock and a…
3
votes
0 answers

MongoDB: $isolated with sharded cluster

The MongoDB docs say: $isolated does not work with sharded clusters Does this mean it does not work at all? Or does it mean that it does not work if the affected documents are on different shards, meaning that it does work if the affected…
heinob
  • 19,127
  • 5
  • 41
  • 61
3
votes
0 answers

DeadLock in mysql using Spring TransactionTemplate

I'm using spring transationTemplate , and run some queries by doInTransaction method. I got exception about deadLock, on 2 queries that executed sequentially into the transaction. REPLACE INTO TABLE(A,B,C) VALUES ('AAA','BBB','CCC'); UPDATE TABLE…
Tal Eden
  • 145
  • 1
  • 3
  • 9
3
votes
3 answers

Concurrency issue on a database select statement

I have an issue and I'm thinking of using database isolationtype == Serializable for this situation, but after reading a bunch of articles I'm still not convinced that that is the solution for my problem below. Setup: Weblogic cluster > 2…
Zeus
  • 6,386
  • 6
  • 54
  • 89
3
votes
1 answer

Why do the concurrent DB connections see each others uncommitted changes though isolation is set to "read committed"?

I am trying to make a few tests to understand how transaction isolation levels can be used to address the various concurrency concerns. I've started with TRANSACTION_READ_COMMITED, but the simplest scenario doesn't behave the way I expect. Here's…
3
votes
1 answer

GET DIAGNOSTICS ROW_COUNT with concurrent statements

I would like to use GET DIAGNOSTICS integer_var = ROW_COUNT in plpgsql code to get the number of rows inserted into a table by a INSERT INTO statement. If I run multiple INSERT INTO statements almost simultaneously can I be sure that GET DIAGNOSTICS…
Thomas
  • 962
  • 2
  • 9
  • 18
3
votes
0 answers

How do I detect, specifically, a serialization failure when using SQL Alchemy?

When Postgresql rolls back a transaction due to a serialization failure, that bubbles up to SQL Alchemy in the form of a DBAPIError (I believe newer versions raise an OperationalError instead). But I want to know whether the issue was…
jl6
  • 6,110
  • 7
  • 35
  • 65
3
votes
1 answer

Read isolation in Neo4j

I know that the default isolation level is READ_COMMITTED and that reads are non-repeatable, but I'm not sure I understand everything this implies. If thread A begins a transaction on an embedded database, then thread B begins a transaction and…
Kevin Krumwiede
  • 9,868
  • 4
  • 34
  • 82
3
votes
3 answers

How to implement custom thread-safe sequence with hibernate 4?

I need to implement a solution to generate serial numbers for objects of diferent kinds but same type (same class, same table). What's more the rules for serial generation are defined at runtime (starting serial, maximum number, etc.). I'm using…
3
votes
1 answer

How configure eclipselink jpa dialect for custom isolation levels

I am using Spring 3.2.1 and EclipseLink 2.4 and JPA 2.0 I get an error when I use other than the default isolation level. Exception in thread "main" org.springframework.transaction.InvalidIsolationLevelException: Standard JPA does not support custom…
Rhododendron
  • 559
  • 2
  • 7
  • 15
3
votes
1 answer

Set default isolation level for Microsoft.Practices.EnterpriseLibrary

I've got a .net 3.5 website that calls thousands of different stored procs using Microsoft.Practices.EnterpriseLibrary. We have been getting alot of timeouts and after some playing and testing the use of (nolock) on the end of the table join in…
3
votes
1 answer

What do I expect from changing default transaction isolation level from READ_COMMITTED_SNAPSHOT to READ_COMMITTED?

In SQL Server the default isolation level is READ_COMMITTED but in SQL Azure the default level is READ_COMMITTED_SNAPSHOT. Suppose I change the default level in my SQL Azure server to READ_COMMITTED_SNAPSHOT (using SET TRANSACTION ISOLATION LEVEL)…
sharptooth
  • 167,383
  • 100
  • 513
  • 979