Database concurrency is a database property that allows users to access data at the same time.
Questions tagged [database-concurrency]
148 questions
4
votes
1 answer
Django concurrency editing
I'm in a bit of muddle about how and where my concurrency editing functions should be implemented, so that a Mutex concurrency editing cannot be performed. My code:
models.py
class Order(models.Model):
edit_version =…

pymat
- 1,090
- 1
- 23
- 45
4
votes
1 answer
Hibernate (JPA): how to handle StaleObjectStateException when several object has been modified and commited
Consider the scenario:
A Db transaction envolving more than one row from different tables with versioning.
For example:
A shopLists and products. Where a shopList may contain products (with their amount in the shoplist) and products have their…

Marcus
- 1,675
- 3
- 18
- 29
4
votes
2 answers
SQL SUM expression and Lock
I have a problem with right SQL solution.
Current situation:
My database contains table with bank transactions (credit and debit).
Credit transactions are signed as posivitive amount (+), and
debit transactions as negative amount (-). …

user6492999
- 135
- 1
- 1
- 7
4
votes
1 answer
How to throttle current jobs in airflow?
I am a newbie to Airflow. But I am now working on how to throttle current jobs in Airflow. Is there someone that knows a little about concurrency or throttling in Airflow. Any suggestions could be helpful.
Thanks a lot.

Angela.Xu
- 41
- 3
4
votes
1 answer
Modifying Entity Framework Entities from Multiple Threads
I have a UI thread which enables the user to set certain properties of an entity.
I also have worker threads which will automatically modify properties of an entity that, importantly, the user does not have access to.
Would it be safe to have…

deed02392
- 4,799
- 2
- 31
- 48
4
votes
1 answer
Single MySql Database Connection for REST service
I am developing Android application which Gets and Posts data to database through REST service. I have configures REST service with Jersey and Tomcat in Java.
I created single database connection when REST service starts.Now all the android clients…

Zain
- 1,226
- 1
- 16
- 26
3
votes
1 answer
Get or Create record with single query
I have a table with column Id,column1,column2.
I wants to make sure only one record exists with column1 and column2 value (column1+column2 is unique).
If there is an already record exists with column1=v1 and column2=v2 then I wants to select the Id…

Sekhar Dutta
- 89
- 1
- 8
3
votes
2 answers
Firestore transaction based on non existent document (Collection level locking not available)
Based on this SO answer I came to know that firestore does not have collection level locking in a transaction.
In my case, I have to ensure that the username field in users collection is unique before I write to a collection.
For that, I write a…

rahulserver
- 10,411
- 24
- 90
- 164
3
votes
1 answer
PostgreSQL - MVCC (multi-version concurrency control) - When is actual lock acquired?
As per my understanding, postgres uses two additional fields Xmin and Xmax to implement mvcc,
Lets say we have Employee table with id and name columns.
Below are some crud operations and how they are working concurrently(considering isolation level…

user10916892
- 825
- 12
- 33
3
votes
2 answers
Can I rely on it that every single update statement in postgresql is atomic?
I read some materials before saying that each update statement in postgresql is atomic.
For example,
update set column_1 = column_1 + 100 where column_2 = 10;
Even though I have multiple processes calling the update simultaneously, I can rely on it…

Jane.L
- 333
- 1
- 5
- 13
3
votes
1 answer
How to set different header for the group thread request in apache jmeter?
I want to test concurrency of application, I'm using apache Jmeter for that, the endpoint I'm requesting, needs to have authorization header for authentication, in apache Jmeter HTTP Header Manager i have added a header with the name Authorization…

Jawad
- 313
- 4
- 16
3
votes
3 answers
Making a HTTP API server asynchronous with Future, how does it make it non-blocking?
I am trying to write a HTTP API server which does basic CRUD operation on a specific resource. It talks to an external db server to do the operations.
Future support in scala is pretty good, and for all non-blocking computation, future is used. I…

druuu
- 1,676
- 6
- 19
- 36
3
votes
1 answer
DynamoDB: Is adding an item using list_append atomic?
The FAQs for DynamoDB says:
Q: Does DynamoDB support in-place atomic updates?
Amazon DynamoDB supports fast in-place updates. You can increment or
decrement a numeric attribute in a row using a single API call.
Similarly, you can atomically add…

stephenbez
- 5,598
- 3
- 26
- 31
3
votes
1 answer
How To Minimize Likelihood of Database Contention During Update
I have written some PostgreSQL database client code to update a central database with a table of IP addresses and host names from multiple clients. There are two tables: one to hold mappings between IP addresses and host names, and one to hold a…

Michael G. Morey
- 318
- 1
- 5
- 13
2
votes
1 answer
Read write problem on an append only table
Suppose I have this append-only SQL table representing deposits/withdraws from/to accounts. The 3 rows below will render the balance of account A to be -$10
ID
Account
Credit
1
A
$100
2
A
-$50
3
A
-$60
If the inserts are concurrent,…

Xiaoguo Ge
- 2,177
- 20
- 26