Skip to content

Commit 07a6cdb

Browse files
authored
fix spelling
1 parent b7172f4 commit 07a6cdb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

articles/mariadb/concepts-connectivity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The first and second case are fairly straight forward to handle. Try to open the
3131
* For each following retry, the increase the wait exponentially, up to 60 seconds.
3232
* Set a max number of retries at which point your application considers the operation failed.
3333

34-
When a connection with an active transaction fails, it is more difficult to handle the recovery correctly. There are two cases: If the transaction was read-only in nature, it is safe to reopen the connection and to retry the transaction. If however if the transaction was also writing to the database, you must determine if the transaction was rolled back, or if it succeeded before the transient error happened. In that case, you might just not have received the commit acknowledgement from the database server.
34+
When a connection with an active transaction fails, it is more difficult to handle the recovery correctly. There are two cases: If the transaction was read-only in nature, it is safe to reopen the connection and to retry the transaction. If however if the transaction was also writing to the database, you must determine if the transaction was rolled back, or if it succeeded before the transient error happened. In that case, you might not have received the commit acknowledgment from the database server.
3535

3636
One way of doing this, is to generate a unique ID on the client that is used for all the retries. You pass this unique ID as part of the transaction to the server and to store it in a column with a unique constraint. This way you can safely retry the transaction. It will succeed if the previous transaction was rolled back and the client generated unique ID does not yet exist in the system. It will fail indicating a duplicate key violation if the unique ID was previously stored because the previous transaction completed successfully.
3737

0 commit comments

Comments
 (0)