Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
0 answers
14 views

shared vs exclusive lock in sql for each isolation level

I am studying transaction in sql, i read about isolation levels. Got to know about shared lock(read lock) and exclusive lock(write lock). As per multiple sources, exclusive lock can only be taken if ...
gourav kumar's user avatar
0 votes
0 answers
18 views

How to extract actual database error instead of the generic transaction aborted error in Postgresql Sequelize transaction

I am using transaction in my sequelize-typescript for creating a record which looks like this return await this.sequelize.transaction(async (transaction) => { const borrower = await this....
codeinprogress's user avatar
0 votes
0 answers
10 views

`TypeError` in Stellar SDK and Stellar wallet kit when using `signAndSend` with `signTransaction` implementation inconsistency across devices

I am working on a project that interacts with the Stellar blockchain, using the Stellar SDK and Stellar Wallet Kit to interact with smart contracts. I have a function that is supposed to create a ...
Tinc X's user avatar
  • 1
0 votes
0 answers
25 views

mysqli rollback commit is not working with innodb table [duplicate]

I am trying to set up transaction rollbacks but no matter what I do, the insert is not rolled back. I have confirmed the DB engine is innoDB: Name Engine Version ...
Notsileous's user avatar
1 vote
1 answer
27 views

Data Logic at Facade level

I have 2 Db's with their own projects, data services and controllers. We have methods for them at the facade level which can use either Db. I have a situation where I need to write something to both ...
Sean McKinney's user avatar
0 votes
0 answers
25 views

migrate legacy java system transaction into spring

I try to find the optimal solution for the following: I have an old JAVA based monolit legacy system, which communicates with servlets. I would like to migrate this using spring framework. I have the ...
hunszab's user avatar
  • 31
0 votes
1 answer
70 views

How to properly set the transaction locks [closed]

The documentation at MSDN for "Set Transaction Isolation Level" lists 4 different isolation levels. I read through them, but I prefer to learn by example, so the explanation is not good for ...
Igor's user avatar
  • 6,085
-1 votes
0 answers
11 views

Data Replication across data center for banking transactions

Suppose I am developing a backend for Transaction management system. When a banking transaction happen which when mapped to Db transaction, does it include write logs to different geos. If it does not ...
Harsh Yadav's user avatar
0 votes
0 answers
43 views

spring boot testcontainers "row was updated or deleted by another transaction"

I want to make an entity testing with with PostgreSQL testcontainers in my SPring boot 3.x app. First I try to insert some constraint violation records and then some valid records and then I want to ...
zamek 42's user avatar
  • 833
1 vote
0 answers
16 views

How can I handle transactions across multiple containers in GridDB?

I am working on a project using GridDB and need to manage transactions across multiple containers. Specifically, I want to ensure that if one operation fails, all changes in the transaction are rolled ...
Abel Mesfin's user avatar
0 votes
0 answers
35 views

How to implement transaction for long running API including multiple document changes in Azure Cosmosdb Mongo Nodejs [closed]

I have multiple API which are interacting with Azure Cosmosdb, where multiple documents are being updated. Now I want to add transactions here. But the limit of 5 seconds for a transaction is making ...
Deep Kumar Singh's user avatar
-1 votes
0 answers
36 views

Handling deadlock between two transactions

Using Postgres and Jooq to generate SQL queries I have two transactions that can run parallelly, each has query INSERT INTO <TABLE> ... ON CONFLICT(SESSION_ID, PARTITION_DATE) UPDATE SET .... ...
Praneeth Bhargav's user avatar
1 vote
1 answer
29 views

The right way to create safe transactions in MongoDB

I’m working on a Node.js application using Mongoose and MongoDB. In the following code, I’m using a transaction to handle creating a new topic with an automatically incremented position. My goal is to ...
Alex's user avatar
  • 11
0 votes
1 answer
39 views

How to batch transaction in Java Neo4J API using CALL { } IN TRANSACTIONS?

I am developing a Java application using Neo4j version 5.20.0 (implementation "org.neo4j:neo4j:5.20.0") and I want to save a list of Person objects in the database. Currently, I have a ...
it_would_be_better's user avatar
0 votes
0 answers
19 views

Spring/Hibernage shares the persistence context from before the transaction with the transaction

In the following example, when the POST /foo/test1 endpoint is called, the entity will be saved to the database. However, calling POST /foo/test2 will not trigger any updates. @RestController @...
Sed Mehdi's user avatar
1 vote
1 answer
38 views

JPA: Why isn't entity save() working inside catch block despite @Transactional?

I am currently working with JPA. I’ve encountered an issue during development. Here’s the current situation: itemService addItem: If the item is already owned, an exception is thrown. If the item is ...
chaiJeon's user avatar
1 vote
1 answer
57 views

Spring Transaction Rollback

I have functions, and this functions will go on catch conditions. My expectations whenever it goes to catch conditions it should've rollback the previous save data. but why the data is still saved on ...
Riki Ahmad's user avatar
0 votes
0 answers
7 views

Repeatable reads transaction level

-- TRANSACTION 1 set transaction isolation level REPEATABLE READ BEGIN TRANSACTION select name from student where id=1 waitfor delay '00:00:15' update Student set name='abc' where id=1 commit ...
Rakesh yadav's user avatar
-1 votes
0 answers
16 views

Mongoose inconsistent stock issue in the transaction which occurs randomly

export const createBill = async (req, res) => { const currentDate = getDate(); const products = req.body.purchased; let { customerId, billId, payment = 0, paymentMode, ...
Kaif Shaikh's user avatar
0 votes
0 answers
53 views

Cannot roll back a transaction with CREATE TABLE statement [duplicate]

func main() { ctx, cancel := context.WithCancel(context.Background()) tx, err := db.BeginTx(ctx, nil) if err != nil { log.Fatal(err) } DoTx(tx, ctx, cancel) } func DoTx(...
mirko sailorm's user avatar
-1 votes
0 answers
26 views

Handling backendless transaction results

I am creating a WPF application using C#, I am trying to get a list of objects from a backendless database using transaction, I don't know how to store them into a list. List<JobCardSRF> list = ...
legoana floyd's user avatar
0 votes
0 answers
28 views

SQL Syntax Error in Transaction with IF Statement [duplicate]

I have this data: CREATE TABLE cuentas ( id_cuenta INT PRIMARY KEY, saldo DECIMAL(10, 2) ); INSERT INTO cuentas (id_cuenta, saldo) VALUES (1, 1000.00); INSERT INTO cuentas (id_cuenta, saldo) ...
pamela giron's user avatar
1 vote
1 answer
34 views

Django atomic transaction unit test failing (commits not being rolled back)

I have a Django project with the following two models: # models.py from django.db import models, transaction class Person(models.Model): name = models.TextField() surname = models....
rlandster's user avatar
  • 7,755
2 votes
1 answer
90 views

Postgres / SQL pattern for atomic SELECT and UPDATE or INSERT within a transaction

I have a simple scenario, where I want to atomically read and modify the state of a row. But the row may not exist yet. For this example, I use the user_group_membership table: user_id (pk) | group_id ...
Benjamin M's user avatar
  • 24.5k
0 votes
0 answers
8 views

Is lost update possible with serializable transaction isolation?

It is often stated serializable transactions prevents all read phenomena including lost update and phantoms. But is this the case when read committed transaction (A) and serializable transaction (B) ...
Tuomas Toivonen's user avatar
2 votes
2 answers
85 views

Why does database not read from newly inserted data when a single query is doing both write and read?

DROP TABLE IF EXISTS A; CREATE TABLE a (id int); CREATE or replace FUNCTION insert_and_return(int) RETURNS int AS $$ BEGIN INSERT INTO a VALUES ($1); RETURN $1; END; $$ ...
Han Qi's user avatar
  • 451
1 vote
1 answer
29 views

Handling race conditions between transactions

I am using postgres 14.2. I am using jooq and spring-boot in my service. I have table user where I have a unique constraint on user_id, created_on, I have to update the value if the value of user_id, ...
Praneeth Bhargav's user avatar
0 votes
0 answers
24 views

pyodbc Transactions in Django View are Committing Changes Despite Rollback Attempts

I'm working on a Django application where I'm using pyodbc to connect to an AWS RDS SQL Server database. I need to run a series of raw SQL queries (including INSERT, UPDATE, DELETE, DISABLE or ENABLE ...
xxxx's user avatar
  • 1
0 votes
1 answer
45 views

Why is there no SQL statement in MON$STATEMENTS.MON$SQL_TEXT for all active transactions in Firebird 2.5

I am trying to find the SQL statements for my active transactions and specifically for OAT. I am running this query: select MT.MON$TRANSACTION_ID,MT.MON$TIMESTAMP,MS.MON$STATEMENT_ID,MS.MON$SQL_TEXT ...
Ivan Ivanov's user avatar
1 vote
0 answers
17 views

How to arrange Spring Batch chunk processing with online transactions

The system has simultaneous batch jobs and online workflows. Consider batch job retrieving unprocessed documents, marking them as processed in the chunk transaction. Chunk processing is required for ...
Tuomas Toivonen's user avatar
0 votes
1 answer
64 views

Google BigQuery InsertAll with Transaction?

I am new to BigQuery in general and I'm attempting to insert multiple rows into a bigquery table while also modifying another table in a single transaction. I'm using the BigQuery java client in ...
Gamer2015's user avatar
  • 289
1 vote
1 answer
50 views

Sequelize transactions are very slow

I'm using sequelize with node to make a simple update endpoint that will make a couple of queries: const update = async (req: any, res: any, next: any) => { const t = await db.sequelize....
Giulio Pretis's user avatar
1 vote
1 answer
32 views

When sanpshot is taken into consideration in transactions?

When is the snapshot actually taken in transactions? On BEGIN TRANSACTION or on the first operation? I've been experimenting with transactions in both MySQL and PostgreSQL using the REPEATABLE READ ...
Mohamed Kamal's user avatar
0 votes
0 answers
85 views

How to send jettons with tonconnectui

I’m new to blockchain programming and am working on creating a transaction using TonConnectUI in JavaScript. I’d like to send a transaction involving tokens that are not typical currency tokens—such ...
amir ali's user avatar
0 votes
0 answers
10 views

Spring MongoDB swallowed exception still causes transaction to roll back

I tried to use MongoTemplate to insert the same user object twice with userId being the _id, the second insert fails due to DuplicateKeyException which is expected, and then the DuplicateKeyException ...
davenkin's user avatar
0 votes
0 answers
74 views

Neo4j CALL {} IN TRANSACTIONS Does Not Work in Neo4j HTTP API

According to this https://neo4j.com/docs/http-api/current/transactions/, neo4j transactions cannot be used in explicit transactions and need to be sent as implicit transactions. However, after ...
Ugur Yilmaz's user avatar
0 votes
0 answers
29 views

Can't load Hive transactional table into dataframe using Spark2

I'm trying to load a hive transactional table into a PySpark dataframe, but receive the error: py4j.protocol.Py4JJavaError: An error occurred while calling o086.showString. Caused by: java.util....
Quatervois's user avatar
0 votes
0 answers
72 views

Failed capture of amounts in transaction table

I have not been able to extract all the information from a table of debit and credit transactions. The following is the table: I have used several approaches and ideas with regular expressions, but I ...
Oscar CENTENO MORA's user avatar
1 vote
1 answer
105 views

Atomikos library has incompatibility packages (from javax.transaction to jakarta.transaction)

I have Atomikos (6.0.0) in Spring Boot 3 and using Java 21. It's working but using a @Deprecated class, "ChainedTransactionManager(transactionManagerOne, transactionManagerTwo)". This way ...
sergiopf's user avatar
0 votes
0 answers
37 views

Hibernate does not rollback super class entity tables

I have an inheritance of type JOINED between User and RegisteredUser. I have defined a unique constraint on the derived class entity (RegisteredUser). When I create an object of the derived class and ...
Gozar-Manu Ariana's user avatar
1 vote
0 answers
38 views

How to smoothly transition between absolute and fixed positions on a navbar during scroll?

I'm trying to implement a navbar that switches from position: absolute to position: fixed when the user scrolls down more than 160 pixels. My goal is to have a smooth transition between these two ...
Eric Gutierrez's user avatar
0 votes
0 answers
30 views

Issue With HibernateTransactionManager while migrating Spring MVC applicaiton from spring 4.x/hiberate3.x/java1.8 to spring6.1/Hibernate5.x/Java17

I am migrating lagacy spring mvc application with spring4.x/hiberate3.x/java1.8 in tomcat8.5 server to spring6.1/Hiberate5.6.x/java17/tomcat10.1.3. as part of this process , I replaced JOTM ...
Venkata Yesoda's user avatar
0 votes
0 answers
25 views

@Transactional propagation and isolation levels in Spring Boot

I have a question regarding @Transactional annotation. In our project we have a REST controller that receives events from the message bus and calls a UseCase(@Service) to save the changes to the ...
newbee's user avatar
  • 1
2 votes
1 answer
59 views

Nested SQL transactions in Active Record - risks?

I am in a situation in which I am forced to use nested transactions: I have several methods that save a bunch data, each of them needs to be wrapped in a SQL transaction, and they also have to call ...
Adriano di Lauro's user avatar
0 votes
0 answers
35 views

How to achieve MySQL transaction with complicated computation? [duplicate]

For example, here's a table with 2 columns called USER_ID, MY_COLUMN. I want to change the MY_COLUMN for a single user specified by USER_ID. If the modification is very naive/simple, say MY_COLUMN is ...
Yan's user avatar
  • 432
0 votes
3 answers
88 views

Circular dependency on TransactionManager Bean in Spring Batch

I'm working on a Spring Batch project and I have a StackOverflowError with this Bean. @Bean @Primary public JtaTransactionManager transactionManager(UserTransaction userTransaction, ...
Chlamy's user avatar
  • 37
1 vote
0 answers
67 views

Why does this optimistic lock fails?

I was experimenting with optimistic locks and wrote this for hset, under heavy load of events trying to update the same key, observed TxFailedErr(redis: transaction failed) from redis client which is ...
kryo's user avatar
  • 11
0 votes
0 answers
56 views

Spring Boot Kafka Issue With Transactionality When Using ReplyingKafkaTemplate

I want to use ReplyingKafkaTemplate in order to implement Request-Reply messaging pattern with Kafka having end-to-end transactionality. I have tried many solutions and I concluded to the following ...
Periplanomenos's user avatar
1 vote
0 answers
24 views

In Kotlin/Android, can I use withContext() and withTransaction together?

The situation is that I have to combine networkcalls and database executions in a single method, as in this pseudocode: do { fetchPagedDataFromNetwork insertDataIntoDatabase } while not last ...
ErnestV's user avatar
  • 137
0 votes
0 answers
32 views

Understanding Optimistic vs Pessimistic Concurrency Control in Real-World Use Cases

I'm having trouble understanding the difference between optimistic and pessimistic concurrency control when applied to real-world scenarios. Let's consider this example: Scenario 1: Updating order ...
Chalindu Kodikara's user avatar

1
2 3 4 5
328