17,085 questions
-5
votes
1
answer
74
views
How to join DB transaction restClient, Kafka in transaction manner? [closed]
How to
Save to DB ( in a transactional manner)
restClient connection
Send the Kafka message about it in case of success, and vice versa?
@Slf4j
public class SyncServiceImpl implements SyncService {
...
-1
votes
1
answer
95
views
try catch block inside withTransaction breaks transaction
const session = client.startSession();
await session.withTransaction(async () => {
for (const transaction of purchase_detail) {
try {
await IOS_COL.insertOne(...
0
votes
0
answers
60
views
Why does JPA defer UPDATE statements until transaction commit regardless of database isolation level?
In JPA, when an entity is modified inside a transaction (e.g., via a setter), the change is tracked only in the persistence context through dirty checking, and the actual UPDATE SQL is sent to the ...
0
votes
0
answers
61
views
LMDB nested RW transaction
I have been working with the LMDB API (v0.9.33) for some time, and recently I have had the need to open a transaction inside an existing one.
The parent transaction may or may not exist, and it may be ...
3
votes
1
answer
45
views
Why is Promise.all not supported inside MongoDB (Mongoose) transactions?
I’m using MongoDB transactions with Mongoose, and I noticed a warning in the official docs that confused me regarding concurrency.
According to docs for ClientSession.startTransaction():
IMPORTANT: ...
0
votes
1
answer
43
views
TypeOrm nested transaction behavior
How is the behavior of executing this code in typeorm:
await myDataSource.transaction(async (trans) => {
return await trans.transaction(async (trans2) => {
// ????
}
})
The original ...
0
votes
1
answer
142
views
How do transactions with FastAPI Depends() work?
With Piccolo ORM I use FastAPI Depends() to reduce repetition. The FastAPI page I based this code on is somewhere in the documentation. SQLite requires a different transaction type for certain SQL ...
0
votes
1
answer
66
views
Does PostgreSQL read committed isolation level guarantee 2 transactions: subtract 3 and subtract 5 together always result 10 - 8 = 2?
Does PostgreSQL read committed isolation level guarantee 2 transactions: subtract 3 and subtract 5 together always result 10 - 8 = 2 ?
i.e. PostgreSQL
Origin_value = 10
1 Tr = 1) read Origin_value 2) ...
Best practices
0
votes
4
replies
162
views
How to ensure an inserted row survives a rollback?
In SQL Server, I have a stored procedure that returns some sensitive data to the client, and logs that fact into a log table. The stored procedure is executed in a transaction controlled by the client,...
0
votes
0
answers
59
views
Why does MSDTC tracing fail to write any logs?
Per all documentation I can find for the MSDTC tracing feature, selecting "Trace All Transactions" should provide a trace file that can be formatted and read. I have tried for several days ...
0
votes
0
answers
50
views
MikroORM @Transactional decorator isn't working with MongoDB
I am new to MikroORM and having trouble using @Transactional decorator. Below is my code.
Model:
import { Entity, PrimaryKey, Property } from '@mikro-orm/core';
import { ObjectId } from 'mongodb';
@...
1
vote
1
answer
124
views
is @Transactional(isolation = Isolation.REPEATABLE_READ) enough for safe incrementing?
Is it possible to lost increment here? If not, is it possible in case of read_commited level?
@Transactional
public updateProductStatistics(Long productId) {
ProductStats stats = ...
Best practices
1
vote
0
replies
60
views
What's the best practice of distributed transaction implementation for java/spring based service
I am going to try to implement such thing and thinking about the best practice. Of caurse I know about some patterns like SAGA with transaction outbox but I never used it in practice. Is there any ...
1
vote
0
answers
52
views
Data Ownership and Transaction Managment in SOA
I'm trying to learn more about Service Oriented Architecture as to me, it seems like a good middle ground between monolithic and micro service applications. Please correct me if I'm wrong but the ...
1
vote
1
answer
63
views
In a MongoDB transaction, are index entries updated immediately when an indexed field is modified?
I'm working with MongoDB transactions (Node.js, replica set). Inside a transaction, I update a document in a way that changes the value of a field that is covered by an index. Later in the same ...