Forge SQL Atomic Transaction

I wonder if Forge SQL currently supports Atomic Transactions? I want to ensure my updates in one transaction are either all successful or all rejected. Partial successful updates should blocked.

From my understanding, Forge SQL uses its own version of TiDB, and the vanilla TiDB supports transaction: https://docs.pingcap.com/tidb/stable/transaction-overview/ How about Forge SQL?

Hi @MichaelChan

That is a good question! Unfortunately, as per this documentation Forge SQL Implementation, transactions are not yet supported.

Apologies for the inconvenience and do let us know if you’ve got any other questions.

Thanks @CameliaGao for chiming in.

@MichaelChan - we have plans to support atomic (multi) statement execution in a batch. We will share some details around this soon.

It would help us if you could share some details around your use case? Specifically -

  • How many statements do you see running in a single batch?
  • Do you see using different types of queries in a single batch?
  • Do you see a use case where statements later in the batch depends on the output of earlier statements?

Thanks,

Varun

Thanks for the replies, @CameliaGao and @varun .

My initial estimation is that we will be having conditional inserts (checking if there are version conflicts before inserting new versions into the DB) less than 20 rows at a time, but probably mostly around 10 rows. In my current use case, I would only Insert, but not delete or update.

The inserts should either all committed, or I will inform the users about the failure caused by version conflicts. I might have follow-up database actions if the batch insert are successful.

It’s good to hear that you are working it and I am looking forward to more information coming out. Thank you!

1 Like