Re: [PHP-DEV] [PDO] 2 phase commit

2023-12-03 Thread Saki Takamachi
Hi, > Do you have any ideas how to handle this case at the core level in the > regard of php lifecycle? I agree with Kentaro on this. This can be said to be a weakness of two-phase commit itself, but I think it should be addressed in userland or user operations. BTW, I said that I was thinking

Re: [PHP-DEV] [PDO] 2 phase commit

2023-12-02 Thread Kentaro Takeda via internals
Hi Eugene. > 1. We have sent commit to the first database and it responded us with OK > (comitted) > 2. Next we send commit to the second database, and it may be the case that in > that very moment we lose connection. Hence, if connection is lost before > final commit request, second database w

Re: [PHP-DEV] [PDO] 2 phase commit

2023-12-01 Thread Eugene Sidelnyk
One thing I'd like to point out is regarding second phase (commit phase) It's important to understand that once this phase has started, there's no way back. After code execution is behind commit point, the transactions MUST commit no matter what. Data must be committed regardless of network issues

Re: [PHP-DEV] [PDO] 2 phase commit

2023-11-30 Thread Deleu
On Thu, Nov 30, 2023 at 3:59 PM Bruce Weirdan wrote: > On Thu, Nov 30, 2023 at 7:22 PM Larry Garfield > wrote: > > > > > I have not heard of this functionality before, so I don't know how common > > it is. If it's only lightly supported and in different ways, perhaps > this > > is a use case fo

Re: [PHP-DEV] [PDO] 2 phase commit

2023-11-30 Thread Saki Takamachi
Hi Larry, > I have not heard of this functionality before, so I don't know how common it > is. If it's only lightly supported and in different ways, perhaps this is a > use case for the new per-DB subclasses? Many DBs have this functionality, so I was thinking of implementing it in the same w

Re: [PHP-DEV] [PDO] 2 phase commit

2023-11-30 Thread Eugene Sidelnyk
Hi there, This functionality is common for data intensive applications that leverage distributed systems for coping with load. In other words, having it at core level is desirable for enterprise-level systems. Ordinary web-sites are unlikely to use this feature. Though, I'd highly appreciate it

Re: [PHP-DEV] [PDO] 2 phase commit

2023-11-30 Thread Bruce Weirdan
On Thu, Nov 30, 2023 at 7:22 PM Larry Garfield wrote: > > I have not heard of this functionality before, so I don't know how common > it is. If it's only lightly supported and in different ways, perhaps this > is a use case for the new per-DB subclasses? > Postgre (https://www.postgresql.org/do

Re: [PHP-DEV] [PDO] 2 phase commit

2023-11-30 Thread Larry Garfield
On Thu, Nov 30, 2023, at 2:03 PM, Saki Takamachi wrote: > Hi Jeff, > >> Would the implementation use the underlying RDBMS two-phase commit? Or would >> the proposal be to try to build something at the PDO layer to mimic >> two-phase commits? The former seems good, the latter, not so much. > > Whe

Re: [PHP-DEV] [PDO] 2 phase commit

2023-11-30 Thread Saki Takamachi
Hi Jeff, > Would the implementation use the underlying RDBMS two-phase commit? Or would > the proposal be to try to build something at the PDO layer to mimic two-phase > commits? The former seems good, the latter, not so much. When implementing this, if each DB driver's API has a two-phase comm

RE: [PHP-DEV] [PDO] 2 phase commit

2023-11-30 Thread Jeffrey Dafoe
> Hi internals, > > For the past few days I've been thinking about whether to make a suggestion > to add two-phase commit functionality to pdo. > > I would like to hear everyone's opinions. Hello, Would the implementation use the underlying RDBMS two-phase commit? Or would the proposal be to t