72 questions
0
votes
0
answers
33
views
DynamoDB single partition transactions
I am new to DynamoDB transactions. The documentation says that
These actions can target up to 100 distinct items in one or more DynamoDB tables within the same AWS account and in the same Region.
...
0
votes
0
answers
25
views
Simulating 2 phase distributed commit failures using grpc
I have 3 replicas (grpc servers) and 1 transaction coordinator. I am trying to simulate a failure of transaction coordinator before sending the prepare message. Ideally the replicas should timeout and ...
0
votes
0
answers
10
views
In 2 Phase Commit, How does the coordinator retrieve a list of participating systems?
Most of the articles on 2PC that I've read, mention that the first phase is sending a "Prepare" message to all participating systems. My question is - how can you know the full list of ...
2
votes
0
answers
113
views
Atomikos - Working with two databases and single repository
I'm playing around with Atomikos. Using this as a starting point: https://www.fabiomaffioletti.me/blog/2014/04/15/distributed-transactions-multiple-databases-spring-boot-spring-data-jpa-atomikos/
In ...
0
votes
0
answers
353
views
Does 1 phase commit make sense in distributed systems?
I'm trying to understand what is the difference between 1 and 2-phase commit and why 1phase commited does not make sense distributed systems. From my understanding here they are:
In 1 phase commit ...
7
votes
1
answer
3k
views
Two Phase Commit vs Three Phase Commit
I am currently studying 2 phase and 3 phase commit.
The 3PC protocol tries to eliminates the 2PC protocol’s system blocking problem by adding an extra phase, preCommit. As mentioned here
According to ...
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 ...
1
vote
0
answers
255
views
How to perform an async distributed transaction among multiple SQL Server instances
In the .NET ,where we have the flexibility to call multiple services at the same time with Task parallels concept. Considering a scenario where I have three different tasks , each task call different ...
0
votes
0
answers
462
views
2pc - XA/Distributed Transaction Coordinator Implementation
I have watch several of article about XA/Distributed Transaction Coordinator, many of them just mentioned that a DBMS must explicitly support XA in order to run. They also talk about how a Distributed ...
2
votes
3
answers
987
views
XA support for Microservices
Scenario: I have multiple XA compliant databases fronted by different microservices which perform CRUD operations on them. I need to perform a 2 phase commit among these microservices. This means that ...
-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 ...
0
votes
1
answer
458
views
Updating multiple databases in "distributed transaction"
I have 2 databases. One is a SQL Server and other is MongoDB. Both these DBs are hosted on AWS.
I need to make a .NET background service that runs periodically (maybe once a month) and update a huge ...
4
votes
1
answer
2k
views
Outbox pattern - Message Relay without duplicates and unordering for any SQL and NoSQL DB
Dual write is a problem when we need to change data in 2 systems: a database (SQL or NoSQL) and Apache Kafka (for example).
The database has to be updated and messages published reliably/atomically.
...
0
votes
1
answer
536
views
How to handle error and revert transaction state if one of the API call fails out of sequence of APIs to be called in transaction
I have following type of 3rd party APIs to be called in sequence in c# code.
try
{
transaction:
{
call API 1;
call API 2
call API 3
}
}
Catch
{
transaction ...
7
votes
1
answer
2k
views
2PC distributed transactions across many microservices?
I read some information about 2 Phase Commit/ XA distributed transactions and how JTA does support it. Seems to be that there is many resource managers - RM (eg. RDBMS or JMS), and one ...
1
vote
1
answer
890
views
Atomikos with Spring Boot gives atomikos.icatch.SysException: No Assembler Service found - please make sure that the right jars are in your class path
I am trying to use Atomikos with Spring Boot to try a distributed transaction across two databases. I have followed the documentation but no matter what I do I get the error below:
com.atomikos....
-1
votes
1
answer
180
views
Spring boot+ 2 phaase commit+ atomikos is not starting
Error Log pasted below:
[http-nio-8080-exec-1] ERROR c.r.r.c.e.CustomRestExceptionHandler - Exception Occured org.springframework.web.util.NestedServletException: Handler dispatch failed; nested ...
0
votes
1
answer
69
views
How to integrate operations of jpa repository methods i.e. save into xa resource transactions?
I want to make operations performed by crud repository of jpa as part of xa transactions i.e. they should be committed when xa resource is committed.
Following is the code in which save method uses ...
0
votes
1
answer
658
views
Distributed transaction with 2 phase commit - atomicity issue due to commit phase not being synchronous
I have a WCF service which includes an operation marked with OperationBehavior(TransactionScopeRequired=true) and TransactionFlow(TransactionFlowOption.Allowed).
The client of this service is also ...
2
votes
0
answers
260
views
2 phase commit implementation
I'm trying to implement a 2-phase commit over a document database which supports only single-phase commit using transaction info on the inserted data.
I understand the theory behind 2-phase commit, ...
1
vote
1
answer
742
views
Distributed transactions + Strong consistency : Feasibility?
Background:
I know of quite a few large scale systems, especially in e-commerce domain where distributed transactions are used along with eventual consistency.
Question:
Is it possible to have a ...
25
votes
6
answers
19k
views
Why is 2-phase commit not suitable for a microservices architecture?
I've read a post saying that:
We can not implement traditional transaction system like 2 phase commit in micro-services
in a distributed environment.
I agree completely with this.
But it would ...
0
votes
0
answers
405
views
.NET transactions, Mongo DB, 2 phase commit vs. single phase commit
We are integrating Mongo DB as the database in our .NET based system.
Since data consistency is required in our system, we need to support transactions.
Mongo DB v4.0 supports transactions, but in ...
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 ...
0
votes
0
answers
6k
views
ORA-24756: transaction does not exist
Am doing a distributed update and I get this ORA-24756 error:
DISTRIB TRAN bea1.67AA54355C4A74ECDEE0
is local tran 6.42.332492 (hex=06.2a.512cc)
insert pending prepared tran, scn=8151148567799 (hex=...
0
votes
0
answers
263
views
2PC or event publisher (Spring Batch) or Oracle Database Link
I have a situation wherein as part of a online transaction, I have to save some data into other database, a slight latency (few seconds) in updating the other database is fine. Now since both ...
1
vote
2
answers
895
views
MQ - How to guarantee message delivery in a non-transacted, lightweight environment?
How to guarantee message delivery in a non-transacted, lightweight environment?
For example:
Normal situation: Write to database, commit, send message to ZeroMQ|Redis|OtherMQ, consumer pulls the ...
0
votes
1
answer
332
views
Narayana/2PC/XA - Unlock resources after prepare message propagation failure
Consider this scenario.
Coordinator sends prepare messages to 2 participants, and crashes
Participants lock resources successfully, and then wait for the coordinator to recover
Coordinator recovers, ...
1
vote
1
answer
3k
views
An explanation of DRBD Protocol C
What protocol does DRBD employ to guarantee that it can maintain 2 disks in sync with each other?
Does it use 2-phase commits (or a variant similar to 2PC)?
Does DRBD have an asynchronous/offline ...
0
votes
1
answer
597
views
How do Narayana/XA recover from TM failures?
I was trying to reason about failure recovery actions that can be taken by systems/frameworks which guarantee synchronous data sources. I've been unable to find a clear explanation of Narayana's ...
1
vote
2
answers
3k
views
Why is Two-Phase Commit (2PC) blocking?
Can anyone let me know, why 2PC is blocking when coordinator fails? Is it because the cohorts don't employ timeout concept in 2PC?
Good reference: Analysis and Verification of Two-Phase Commit & ...
9
votes
3
answers
14k
views
How to do 2 phase commit between two micro-services(Spring-boot)?
I Have two mico-serives A and B where they connect to seperate database, From Mico-serives A i need to persist(save) objects of both A and B in same transtation how to achive this.
I am using Spring ...
0
votes
1
answer
33
views
Distributed transaction agreement
Imagine we have 2 nodes that perform money transfer. Node A initiate a money transfer from one account to another and node B is responsible for completing this transaction. So to complete this ...
3
votes
3
answers
682
views
How ZooKeeper guarantees "Single System Image"?
In the Consistency Guarantees section of ZooKeeper Programmer's Guide, it states that ZooKeeper will give "Single System Image" guarantees:
A client will see the same view of the service regardless ...
1
vote
1
answer
1k
views
TransactionScope with Linux
I am trying to have WebAPI 2.2 self hosted on Linux enviroment which can be done with Mono, the catch is i am using transaction scope for distributed transactions, so is it (DTC) supported on non ...
3
votes
2
answers
2k
views
What if commit fails in XA?
I am referring to the description of 2-phase commit at https://en.wikipedia.org/wiki/Two-phase_commit_protocol.
In the pre-commit phase, assume both resource managers have voted positively.
If the ...
11
votes
2
answers
4k
views
What problems can two-phase commits cause?
Recently I've read multiple times that two-phase commits are bad, but always as a side note. So there was never a good explanation with it.
For example in CQRS Journey Chapter 5:
Second, we're ...
1
vote
0
answers
343
views
MQ Queue transaction not rolled back in a 2 phase transaction
I have an EJB timer (EJB 2.1) which has bean managed transaction.
The timer code calls a business method which deals with 2 resources in a single transaction. One is database and other one is MQ ...
4
votes
0
answers
3k
views
Does MS SQLServer support 2-phase commit?
To serve as RM (resource manager) in distributed transaction, DBMS must implement 2-phase commit. Like in PostgreSQL, when you first "pre-commit" local transaction:
PREPARE TRANSACTION 'foo'
then ...
0
votes
1
answer
384
views
Oracle DML with 2 phase commit not materialized
Today I was hit by a successful 2pc that wasn't materialized in Oracle. The other participant was MSMQ which materialized fine.
The problem is that I did not get an Exception in the application (...
2
votes
0
answers
1k
views
Two-phase commit vs Paxos
I am quite confused with these two technologies.
Are there any relationship between these two technologies
Are there any existing popular open source software implements these technologies? I know ...
2
votes
1
answer
3k
views
How to implement 2pc in Zookeeper cluster?
I have a question regarding implementation two-phase-commit protocol in zookeeper cluster to coordinate certain transaction among multiple client connections. Right now I have the following idea:
...
5
votes
1
answer
3k
views
Two-phase commit: availability, scalability and performance issues
I have read a number of articles and got confused.
Opinion 1:
2PC is very efficient, a minimal number of messages are exchanged and latency is low.
Source:
http://highscalability.com/paper-consensus-...
25
votes
4
answers
7k
views
How does three-phase commit avoid blocking?
I am trying to understand how three-phase commit avoids blocking
Consider the following two failure scenarios:
Scenario 1: In phase 2 the coordinator sends preCommit messages to all cohorts and has ...
4
votes
1
answer
557
views
Distributed transactions - why do we save tranlogs to file system?
All transaction managers (Atomikos, Bitronix, IBM WebSphere TM etc) save some "transaction logs" into 'tranlogs' folder to file system.
When something terrible happens and server gets down sometimes ...
0
votes
1
answer
364
views
2 Phase Commit Global Transaction Status after 2nd Phase failure
My question is this:
Say I have a Transaction Manager and 2 Resource Managers.
TM tells RMs to prepare.
RMs acknowledge they are prepared/vote yes.
TM tells RMs to commit.
RM 1 commits and ...
0
votes
2
answers
2k
views
2 Phase commit in tomcat using JPA
I have an application deployed in Tomcat with backend oracle and JPA as persistence manager. Now we are introducing an intermediate database (most probably SolidDB or TimesTen) which will bring an ...
4
votes
1
answer
5k
views
How to wait during SELECT that pending INSERT commit?
I'm using PostgreSQL 9.2 in a Windows environment.
I'm in a 2PC (2 phase commit) environment using MSDTC.
I have a client application, that starts a transaction at the SERIALIZABLE isolation level, ...
2
votes
1
answer
1k
views
PREPARE TRANSACTION releasing locks?
I must be missing something about PostgreSQL and two phase commit with PREPARE TRANSACTION.
The following SQL :
BEGIN; SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
UPDATE person.tcities set ctyname=...
2
votes
2
answers
1k
views
Implement two phase commit protocol between EJB Application(Running on Glassfish) and Swing application
I have a EJB application running on Glassfish server which stores data on MySQL DB which I call as Global DB.
I have two exact remote Swing applications which are stand alone applications accessing ...