17,092 questions
2
votes
1
answer
46
views
Purpose of WriteCommitted isolation transaction level (Golang database/sql package)
In Golang, database/sql package, there is a constant such as LevelWriteCommitted for the IsolationLevel type
https://pkg.go.dev/database/sql#IsolationLevel
What is the purpose of this level? There is ...
2
votes
1
answer
74
views
Django transaction.atomic() on single operation prevents race conditions?
Why I need to use atomic() when I have only 1 db operation inside atomic block? My AI-assistant tells me that it prevents race conditions, but I don't use select_for_update() inside. It tells that db ...
0
votes
1
answer
69
views
aiosqlite and managing transactions
aiosqlite's own documentation is extremely minimal so I would appreciate help from experts.
I have a chat client project and the backend is in Python/FastAPI, with all the relevant calls being async ...
1
vote
0
answers
120
views
How do I disable autocommit and make a batch of put operations atomic?
I’m using GridDB Cloud (Free) with the Python client, and I need to write a batch of rows to a TimeSeries container atomically (all-or-nothing). I'm having trouble figuring out how to turn autocommit ...
2
votes
1
answer
62
views
Why @Transactional method does not behave as expected in tests?
I'm testing that:
@RunWith(SpringRunner.class)
@DataJpaTest
@Import({ OrderService.class, UserService.class })
@AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE)
public class ...
2
votes
0
answers
78
views
Doctrine ORM: Transaction commit fails after rollback in batch loop (Symfony 5.4, PHP 7.4)
I'm running a batch process in Symfony 5.4.48 (PHP 7.4.30, Doctrine ORM 2.20.3) where I need to handle database transactions per iteration. If a business condition fails, I want to rollback the ...
1
vote
1
answer
65
views
How do I rollback database changes only after all tests are run?
For my JUnit 4 tests, a handful of database inserts have to be performed by code. However, the application framework has some overhead, which makes this step really slow.
To save time, I tried to run ...
0
votes
0
answers
52
views
How to suppress redundant update in Hibernate when insert + update happen in same transaction (trigger firing twice)?
In my Jakarta EE application (EJB + JPA with Hibernate), I have the following scenario:
A Contact entity is created (INSERT).
Immediately after creation, for some business reason, the same entity is ...
0
votes
1
answer
79
views
Write multiple tables to Oracle database in a single transaction (via ROracle)
Is it possible to write multiple R dataframes to an Oracle database in a single transaction via ROracle/DBI and dbWriteTable ?
dbWriteTable commits the table in full, so transaction management via ...
0
votes
1
answer
89
views
Executing lambda functions inside transactionExecutor threads for unit tests
i have few methods that need to be iterated in new transactions but facing errors when i try to write unit tests for them
@Inject
private SchedulerUtil schedulerUtil;
@Inject
private ...
0
votes
1
answer
86
views
Why doesn't @TransactionalEventListener(AFTER_COMMIT) trigger when event is published from another AFTER_COMMIT listener?
I'm trying to chain Spring transaction events, but the second @TransactionalEventListener is not triggered when an event is published from within another AFTER_COMMIT listener. Here's a minimal ...
0
votes
0
answers
112
views
Storekit 2 Local Testing Transaction Manager Not Working Properly With Auto-renewable Subscriptions
I am encountering a strange behaviour when testing locally an app with auto renewable subscriptions. I have three subscriptions, with three price levels (simplified for clarity): Base ($10), Premium ($...
0
votes
0
answers
67
views
How to make multiple SQL statement transaction atomic in MS Access? [duplicate]
I needed that both DELETE SQL statements will be performed, or none of them. The tables are linked to SQL Server.
I tried this:
Private Sub onDelete_Click()
On Error GoTo HandleErr
...
0
votes
1
answer
98
views
Share transaction between methods in EF Core
I have a class with two methods, MethodA and MethodB. They both use Entity Framework Core to make changes to a database. External code can call any of these methods. If MethodA is called, it will do ...
0
votes
1
answer
68
views
Cannot use Connection.transaction() in a manually started transaction
The code is used in many projects and works but in one service sometimes an error occurs:
"InterfaceError: (sqlalchemy.dialects.postgresql.asyncpg.InterfaceError) <class 'asyncpg.exceptions....