Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
208 views

ASP.NET Core 6 and EF Core - distributed transaction

We have upgraded recently from .NET Core 2.2 to .NET 6.0 and we encounter several issues. One of them is related to using System.Transaction which somehow is being upgraded to distributed transaction ...
herme 0's user avatar
  • 972
2 votes
0 answers
180 views

How do distributed locks work in Spring Data JPA repository level?

Let's imagine we have an application that has 3 instances and 1 DB (there might be more synchronized DBs) and we have a withdraw method that basically selects the account from account table with @...
Aksoy's user avatar
  • 131
0 votes
1 answer
104 views

Mismatched number of SQL Server Transactions in LinkedServer

I have a linked Server connected from ServerA to ServerB. In each server there is an SP that initiates a transaction and it is necessary for one ServerA.SP to be executed within ServerB.SP. My problem ...
Moises Hernandez's user avatar
0 votes
0 answers
118 views

Running two JDBC transactions for different databases - will it work?

I want to make transactional update in two databases. Given I have following pseudocode: try { Connection conn1 = DriverManager.getConnection("jdbc:postgresql://HOST1", "postgres1&...
MiamiBeach's user avatar
  • 3,465
0 votes
1 answer
41 views

How to rollback all the insert and update that are done in different tables from different function calls that are called through the single api

I am calling an API to save the production data, I need to save various details like batch no, machine no, and process in different database Class ProductionImpl{ public Long saveProduction(...
YJ_'s user avatar
  • 1
0 votes
0 answers
533 views

Read uncommited data using transaction id in postgres after prepare transaction

I have a use case as below: Prepare a transaction and keep this transaction id. Do some operations in multiple sessions using the same transaction id. Do some operations in any external system. Do ...
Rudra's user avatar
  • 411
3 votes
2 answers
922 views

Design / Implement Transactional Outbox pattern in schema isolated multitenant application

I have a multi-tenant application. The tenants data is isolated based on schema. I want to implement a transactional outbox pattern, where I want to store the events in a table (in same transaction)...
Kumar's user avatar
  • 1,666
1 vote
0 answers
138 views

2 phase commit data consistency when one node crashes or is slow during commit phase

In 2 phase commit, lets say one of the nodes crashes or is slow during the commit phase and the other nodes have already successfully committed their changes. Now if a query is issued to one of those ...
jittrfunc's user avatar
  • 113
0 votes
0 answers
1k views

Distributed transaction in .net core 3.1

Hi I am having a simple worker service project in .net core 3.1. For one of the functionality i need to have distributed transaction. I referred the example described here. I am not getting any ...
SidD's user avatar
  • 6,247
0 votes
2 answers
1k views

Transactions Across Microservices

I have two entities: Entity A: private Long idA; Entity B: private Long idB; private Long fkA; My Micro Service can save, modify or delete only the B entity : Repository: @Repository public ...
Paul Marcelin Bejan's user avatar
3 votes
0 answers
1k views

PostgreSQL with JSONB vs MongoDB

For a social media platform that I'm developing, I need to model the database for the user content. The content published by the user will be typically title, description, comments with replies and ...
Lahiru Udayanga's user avatar
0 votes
1 answer
222 views

How would you build a in-memory database which is transaction safe? ACIDITY is key here

I have been tasked to build an in-memory database that is transaction safe? Which technologies will be easier to implement? Any references are much appreciated; I am not sure how to implement that? In ...
rapport89's user avatar
  • 109
0 votes
1 answer
385 views

Extremely slow transaction commit on multi-node Hazelcast cluster

We are experiencing an extremely slow commit to hazelcast randomly with 2 node hazelcast server. We have XA transaction manager with database and hazelcast participating in same transaction and ...
simonC's user avatar
  • 4,309
-1 votes
1 answer
791 views

Stored Procedure and REST API call as a transaction

Imagen that you have a stored procedure in a database that you call from PHP. That procedure works like a transaction and selects/inserts data into the database. If it succeeds it commits, if it fails ...
odjuret's user avatar
  • 19
0 votes
0 answers
884 views

Spring Boot 2 Transactional Annotation Not Working

Question regarding our Spring Boot 2.3.8.RELEASE implementation of @Transactional. The requirement is to implement distributed transactions that writes to an instance of PostgreSQL and ActiveMQ ...
Sam J Sem's user avatar
1 vote
1 answer
147 views

TransactionManager.DistributedTransactionStarted event is not fired when using SQL Azure database

I need to detect transaction promotion in a big project (I want to log call stacks of those cases). I'm using the TransactionManager.DistributedTransactionStarted event to detect such a cases. It ...
Pecan's user avatar
  • 350
5 votes
1 answer
2k views

Why is replica set mandatory for transactions in MongoDB?

As per MongoDB documentation, transactions only works for replica sets and not single node. Why such requirement? Isn't it is easier to do transaction stuff on a single node rather than a distributed ...
Rajat Goel's user avatar
  • 2,305
0 votes
1 answer
66 views

how two phase commit ensure serializability

Two phase commit is used in distributed transaction. For example, a client sends a transaction to two databases with a coordinator. step1: client get a global transaction id from coordinator step2: ...
gaoxinge's user avatar
  • 459
1 vote
2 answers
686 views

Amazon Document DB: How to Implement multi-document transactions

When using mongo template to start a session for transaction in document db cluster. public class DocDBService() { @Autowired MongoTemplate mongoTemplate; @Autowired MongoTransactionManager ...
Mukundhan's user avatar
  • 3,447
0 votes
1 answer
128 views

What is exactly the process of transaction manager in JTA

After reading a lot of blogs about JTA, there is still some points confuse me. For example I found in JTA Example The blog provide a picture to explain relationship between components of a ...
ratsafalig's user avatar
0 votes
1 answer
139 views

Could I just always flush a write ahead log instead of implementing a Two-Phase Commit protocol?

I have trouble understanding parts of the two-phase commit protocol. I don't understand how the second phase helps at all. As far as I understand, the second (completion) phase can fail just as if we ...
Julius's user avatar
  • 1,265
0 votes
1 answer
382 views

how can I do conditional insert in postgres when there can be concurrent inserts that can create conflict?

I am trying to write an experimentation framework where user can schedule some experiments based on location-ids and time. my table schema looks like : TABLE experiment ( id INT NOT NULL ...
Nipun Jindal's user avatar
3 votes
1 answer
2k views

Distributed transaction among services in a microservice system, using spring-cloud

The current situation Got a project using: spring-boot, spring-cloud, postgresql, as a microservice system. There are 2 services, say SA and SB, they operate on 2 RDBMS databases respectively, say ...
Eric's user avatar
  • 24.6k
3 votes
1 answer
4k views

Distributed transactions with RabbitMQ in spring boot application

Currently working on migrating a monolith app into micro services and I want to know how to achieve the distributed transaction in across application. Is there any examples for RabbitMQ handling ...
Balasubramanian's user avatar
0 votes
1 answer
2k views

How to resolve Runtime error no transaction is active?

I am dealing with a legacy program written in Visual Basic the source code of which is unfortunately unavailable to me. The set up I have is the following. There is a server, lets call it S, and two ...
user1563544's user avatar
0 votes
1 answer
179 views

How to work with database B within the scope of Spring-managed transaction on database A, all without XA?

To begin with, this question is not about applying an external XA transaction manager, as this would definitely solve the problem. The question is how go around without it assuming the following: ...
leonidos79's user avatar
5 votes
3 answers
7k views

What is a transaction boundary?

I've read this article (assumes I already know what a transaction boundary is) and this SO question (can't decipher meaning of transaction boundary from that question). In other words, there are no ...
Mario Ishac's user avatar
  • 5,857
0 votes
1 answer
593 views

MuleSoft: XA Transaction management for two different REST Call

We have a situation where we need to manage db transaction across multiple rest api call. In traditional example where new customer is registered, ordered, and payment done with different micro ...
Viral's user avatar
  • 199
0 votes
1 answer
520 views

What to do if a transaction fails?

So basically there is a game where you own a planet, you send ships to other planets, and after a bit you can own that new planet. PlanetB is being attacked with a ship: [PlanetA] ----> [PlanetB] ...
Totty.js's user avatar
  • 15.8k
1 vote
0 answers
34 views

How do 2PC prevent commit failure? [duplicate]

I am new to distributed transaction thing, studying how two-phase commit works across a distributed transaction in micro-services architecture. As per my understanding, in the last part of the phase ...
PIYUSH PASARI's user avatar
0 votes
1 answer
240 views

How to configure: WS-AT Narayana standalone?

I want to use Narayana - WS-Transaction in a standalone springboot app that calls two different Webservics in a single transaction. One of those internally uses db resource for insert/update. Is ...
Espresso's user avatar
  • 5,718
21 votes
1 answer
24k views

EF: db.SaveChanges() vs dbTransaction.Commit

I am fairly new to entity framework and I have a doubt on EF's db.SaveChange. From some posts and MSDN I learned that db.SaveChange by default does all the changes in transaction. Also there is a way ...
Arjun Menon's user avatar
1 vote
1 answer
835 views

Can SQL reads return stale data?

Consider the following SQL transaction sequence: // @TransactionOne BEGIN TRANSACTION; CREATE TABLE T (C INT, D INT); INSERT INTO T VALUES (1, 2); COMMIT; // @TransactionTwo BEGIN TRANSACTION; ...
Priyendra Deshwal's user avatar
7 votes
1 answer
6k views

.NET TransactionScope and MSDTC

In my code there are transactions to handle: using (var scope = new TransactionScope()) { repo1.SaveSomething(); repo2.SaveAnythingElse(); scope.Complete(); } Inside repo1 and repo2 functions ...
Zoltan Hernyak's user avatar
7 votes
1 answer
251 views

Azure failed to marshal transaction into propagation token for elastic transaction (Works for MSDTC)

In windows azure we have hosted two asp.net webapi project as app service. We need to enable distributed transaction here. We initiate transaction inside one api. Then inside that transaction scope we ...
Anup's user avatar
  • 1,702
1 vote
1 answer
780 views

Configuring transaction across multiple resources using spring framework?

I understand the fact that a transaction that spans multiple transactional resources is called a global transaction. Question 1: Is this just an another name for distributed transaction or is that ...
Nataraj's user avatar
  • 107
0 votes
0 answers
834 views

The transaction has aborted error though

I am using EF6 with code first approach. I have a case where I am trying to apply same transaction over 2 different databases. Find my code below for the reference, using (var scope = new ...
Pavvy's user avatar
  • 348
1 vote
0 answers
59 views

Is READ COMMITED transactional isolation level implicity when using FOR UPDATE?

After scouring the internet for information about Transactional Isolation levels, I understood that Row Locking in MySQL can be achieved by using either SELECT...FOR UPDATE or LOCK IN SHARE MODE and ...
Ngenazy's user avatar
  • 165
1 vote
1 answer
953 views

Why is DbContext.Database.CurrentTransaction always null?

Is there anyway to find if a DbContext is enlisted in any transaction while enlist=false in the connection string? I was tracing DbContext.Database.CurrentTransaction, but I noticed it is always null. ...
Abdulkarim Kanaan's user avatar
2 votes
0 answers
997 views

How to put multiple web service calls under one transaction in asp.net

I am working on an asp.net application which has a registration module. To complete this registration process, we are making three different 3rd party web service calls (these services are Rest as ...
Pradeep's user avatar
  • 1,222
0 votes
0 answers
1k views

Distributed Transaction vs Message Queue

I am trying to implement distributed transactions in my current application which are working fine currently with MSDTC, the only problem is that MSDTC is only supported in windows. The alternative ...
Vimalshah26's user avatar
1 vote
1 answer
2k views

Java - Heuristic Exception

Can anyone share how to generate or simulate HeuristicCommitException using Atomikos? Thanks.
wikey321's user avatar
0 votes
1 answer
964 views

In EJB how @TransactionAttribute(TransactionAttributeType.REQUIRED) will commit my jdbc transaction as well?

In EJB I have found that there is an annotation available like @TransactionAttribute(TransactionAttributeType.REQUIRED) , So transaction will be managed by container itself. But with use of it, you ...
Rahul Rabhadiya's user avatar
0 votes
2 answers
367 views

Do database drivers need to support distributed transactions or the support needs to have by database itself?

I am trying to understand the distributed transactions in Java EE. After reading some online materials and books I came to know that in Java EE, there is specific API, called as JTA which is one of ...
CuriousMind's user avatar
  • 8,871
0 votes
1 answer
195 views

TransactionContext in hazelcast, anything like this in Ignite?

"HazelCast" has TransactionContext , is there anything similar to the same functionality which is available in "ApacheIgnite", What my understanding on TransactionContext is, which is a temp storage ...
peaceUser's user avatar
  • 457
0 votes
1 answer
115 views

Challenge: Active Replication for Bank?

I have a question about active replication and ordering. I am aware that traditionally active replication in a distributed system requires total ordering to propagate requests to replicas, however, I ...
user3421420's user avatar
7 votes
2 answers
2k views

Why is two-phase commit considered atomic?

Two phase commit is described as an "atomic commitment protocol". I would expect this to mean that all clients see the state of the world from either before a transaction commits, or after it commits -...
Gavin Wahl's user avatar
  • 1,303
1 vote
1 answer
484 views

Distributed Transaction using WCF

We have a requirement for a very specific scenario to implement distributed transaction in WCF service. Here is the scenario: Client makes a call to WCF Service WCF Service updates Data in SQL ...
arasheed's user avatar
  • 105
0 votes
1 answer
865 views

JMS Local transactions vs TransactionManager

I have been looking into the Jms API lately and I am not certain I understand the local vs transaction manager differences. Scenario 1: Consume message from Jms broker, process the message and ...
Alexandre Thenorio's user avatar
1 vote
3 answers
2k views

How can we update documents transactionally in couchbase?

I have a use case in which there are three documents and I want to update them transactionally i.e. if any of them fails then other too should not get updated in the database. I was looking for an ...
Shivansh's user avatar
  • 3,534