All Questions
Tagged with concurrency database
385
questions
0
votes
0
answers
25
views
How to quickly pull information from an online database that has a server limit per call?
So there is this online database with more than a million entries. I need to retrieve all of them at once to add them to a specific part of my website (I am using javascript/typescript btw). The ...
0
votes
0
answers
20
views
How to Identify Specific Transaction Anomalies in a Given Schedule?
I'm analyzing a schedule of database transactions to identify potential anomalies such as lost updates, non-repeatable reads, and dirty reads. Below is the schedule represented in a tabular format, ...
0
votes
0
answers
59
views
Can MySQL update concurrent a table with different rows
I have a table (users) with 20M records.
I need to update column user_image (this is indexed colum) to a new value.
Now, I am using PHP + amphp/amp (https://github.com/amphp/amp) to run multiple ...
1
vote
0
answers
215
views
How to prevent race conditions when using S3 as a database with concurrent writes?
My application has been using S3 as a database through a library I developed to implement a "database layer" for S3 operations. Although it's not that fast, it's sufficient for my use case.
...
0
votes
0
answers
20
views
Is there a solution to accomodate multiple users making updates to the same database`
We are looking at building a solution where multiple users are viewing rows in a database in different ways and some of those users are updating columns in those rows so that another group of users ...
0
votes
1
answer
84
views
How to decrease consistency of Postgres database, to speed up updates for table with large number of indices
I have a Postgres table with a large number of indexed columns (roughly 100 columns total). Any row update causes all indexes to be updated, which is a lot of work for the DB engine.
I think based on ...
0
votes
0
answers
68
views
Table Clobbered When Attempting Concurrent Writes - psycopg2.errors.SerializationFailure: could not serialize access due to concurrent update
I have uncovered a potential issue when writing to PostgreSQl using a custom upsert function using SQLAlchemy. In the event of concurrent writes one of the following errors are observed:
psycopg2....
0
votes
1
answer
95
views
How does waiting & atomic clock help GCP spanner solve Linearizability and Serializability in distributed transaction?
My understanding why distributed transaction need synchronized clock is the following
Assume NTP max drift is 250ms
true time = 100ms
node A local time = 100ms
node B local time = 0ms
the following ...
0
votes
1
answer
132
views
How does HLC hybrid logical clock solve Linearizability and Serializability in distributed transaction?
My understanding why distributed transaction need synchronized clock is the following
true time = 100ms
node A local time = 100ms
node B local time = 0ms
the following transaction will run into ...
3
votes
1
answer
270
views
Is concurrent INSERT WHERE NOT EXISTS in Postgres safe?
I am using Postgres and have a table users like this
id
array_column
name
uuid1
[A, B, C]
John1
uuid2
[D, E, F]
John2
where id is the PK and array_column is a list of labels
I want to write to ...
0
votes
3
answers
195
views
SQL Insert Race Conditions on Max Amount
We are creating an auction bidding system. We only allow insertions into the AuctionBid ID table, for a Product, if its higher amount than the last bid.
This query will work for single operations.
...
0
votes
0
answers
144
views
Prevent 2 concurrent transactions go over a limit in database
I have the following use case. A user can make transactions but the total amount of those transactions should not go above a limit in a day.
i.e, if the user tries to perform 2 transactions of 100 and ...
0
votes
0
answers
83
views
Strange deadlock using SqlAlchemy + MySql
I use SqlAlchemy + MySql and stuck on a deadlock that I can't understand.
There are a few replicas of app using the same MySql database.
The query to database inserts new row to one table and updates ...
0
votes
0
answers
24
views
Django concurrency bug handling
I have an API written in Django that provides user with the list of files that they have. There is also a delete API that can delete a File that the user has. However, there is a bug where a GET ...
0
votes
1
answer
59
views
MongoDB Transactions Write Conflicts
I have a value called x in my database and two transactions, T1 & T2. Assume both transactions use the multi-document ACID API MongoDB provides.
Each transaction reads the value of x and ...