Database concurrency is a database property that allows users to access data at the same time.
Questions tagged [database-concurrency]
148 questions
0
votes
0 answers
How do I handle INSERT concurrency issues, I'm using eclipselink jpa and mysql with glassfish 4.1?
I have 2 transactions come into my application that want to update a subset of the same entities. However some of those entities are not in the database, so both threads create the same entity and try to commit it. Causing a database Duplicate…

silicontrip
- 906
- 7
- 23
0
votes
2 answers
Attempt to implement repository pattern for an MVC app causes a concurrency exception
I am learning ASP .NET Core and I am trying to use repository pattern to clean up my controllers. The way I thought this out was:
create a repository interface containing the basic methods for a repository
implement the previously created the…

CyberFox
- 342
- 3
- 16
0
votes
0 answers
Eclipselink JPA MySQL Prevent Transactions Concurrency
I have a situation, where data has concurrency in transaction.
Example:
User 1 create Transaction 1 with Item 1 qty 3 and Item 2 qty 5.
User 2 create Transaction 2 with Item 1 qty 6 and Item 2 qty 7.
Every Item has each their own balance (like in…

Ndrik7
- 103
- 13
0
votes
1 answer
How to stop the same data into database when the network is so slow
I use following code to accept the regsiter call from client
.post('/regsiter', async (ctx) => {
requestfrom = JSON.parse(JSON.stringify(ctx.request.body))
let regxemail =…

yupang
- 155
- 1
- 2
- 16
0
votes
1 answer
Django: what is the need for len(queryset) after select_for_update(nowait=True)
I am going through a block of legacy code (Python2.6 and Django1.3.3) to acquire lock. Backend is Oracle.
Refer quoted block of code. What is the need for len(query set) on line number 8? I am particularly puzzled due to comment in line number 7.…

Soundar
- 171
- 7
0
votes
1 answer
Does transaction assures dirty reads do not happen?
I've been reading a lot lately and I am now very confused how transactions and locking are working and how are related to each other.
When working with SQLite, imagine the following flow:
begin SQLite transaction
run a select statement on a SQLite…

Don Box
- 3,166
- 3
- 26
- 55
0
votes
0 answers
Concurrency issue? Standalone python script sharing settings.py and ORM with django server has unreliable view of DB objects?
I'm having a strange problem that is difficult to reproduce (everything worked 2 days ago but some time between then and now no longer does--with no changes in the interim!)
I have a django server program which we are running via gunicorn with…

OL83
- 3
- 3
0
votes
1 answer
How many database connections does 1,000 concurrent mysql users require? Amazon AWS Database
I can't find the answer anywhere and I've looked all over the internet.
I am about to launch an application (mobile game) that connects to a web-server. I am expecting about 1,000 concurrent users to be on the game at peak hours. EVERY request to…

FromThe6ix
- 13
- 3
- 7
0
votes
1 answer
Concurrent database session store
How does amazon maintain the session between devices while adding the products to the cart?
How can we implement that in ROR?

Lalit
- 119
- 1
- 9
0
votes
3 answers
concurrency in oracle plsql
I have a PL/SQL package in Oracle that its important function is :
function checkDuplicate(in_id in varchar2) return boolean is
cnt number;
begin
select count(*)
into cnt
from tbl_Log t
where t.id = in_id
if…

Sam
- 6,770
- 7
- 50
- 91
0
votes
1 answer
Transaction concurrency to prevent read of old version of a record
Let's say I have a table called tasks. Each task has a status. I take one of the tasks that are in the To Manage status, put it in the In Management status, and run the procedure that the task was created for (which may take several seconds to…

tobia.zanarella
- 1,246
- 1
- 17
- 25
0
votes
1 answer
PL/SQL Procedure data freezing (reserving random lotto ticket)
I am using a stored procedure to select a "Random" row from Available_Tickets table, after selection if the user like the number, and buy the ticket, the row will be deleted from the table.
my procedure looks like this:
CREATE OR REPLACE…

alibttb
- 526
- 4
- 19
0
votes
1 answer
EF Core + SignalR multiple client: "Can not rollback - No transaction active"
I am using EFCore SQLite with SignalR.
When there are many clients connect at the same time, database can not changes (insert/update) anymore, this exception throws: "Can not rollback - No transaction active"
A client connects with query param that…

trinvh
- 1,500
- 2
- 11
- 20
0
votes
0 answers
How to synchronize cell values in the same table?
Big problem...
I'm implementing an online ticket sale system in PHP and MySQL. I have a table called "block_of_tickets", or something like that...
This table looks like:
+-----------+------------+--------------+--------------+--------------+
|…

Carlos Souza
- 33
- 4
0
votes
2 answers
Deadlock help needed please
I have a peculiar situation. I have tables that are constantly accessed by different parts of our code and thousands of clients and so we employed the use of transactions when doing simple updates and inserts on our tables. Problem is we keep…

Kobojunkie
- 6,375
- 31
- 109
- 164