Manage transactions in the cloud, Part 1: Transaction basics and distributed transactions

In this first part of a two-part series, André Fachat discusses
transaction basics and distributed transactions. Transactions can make error
handling easy, not just with a single resource but also across resources.
Here, André shows you how two-phase commit distributed transactions work and
points out that even they are only “eventually consistent,” if only by a small
time interval. He also illustrates how a persistent transaction log in the
transaction manager is a requirement for distributed transactions.

Related:

Event ID 4353 — Transactions Processing

Event ID 4353 — Transactions Processing

Updated: February 22, 2008

Applies To: Windows Server 2008

The Microsoft Distributed Transaction Coordinator service (MSDTC) can coordinate transactions for a variety of protocols.

Event Details

Product: Windows Operating System
ID: 4353
Source: Microsoft-Windows-MSDTC
Version: 6.0
Symbolic Name: IDS_DTC_TIP_SUBORDINATE_PREPARED_RECEIVED_UNEXPECTED
Message: The MS DTC Transaction Manager received an unknown or unexpected TIP command (%1) for a “Prepared” transaction that is being coordinated by another transaction manager. Transaction specifics: External TM ID %2; External Transaction URL “%3”; MS DTC TIP Transaction URL “%4”.%0

Resolve

This is a normal condition. No further action is required.

Related Management Information

Transactions Processing

Application Server

Related:

Event ID 4249 — Transactions Processing

Event ID 4249 — Transactions Processing

Updated: February 22, 2008

Applies To: Windows Server 2008

The Microsoft Distributed Transaction Coordinator service (MSDTC) can coordinate transactions for a variety of protocols.

Event Details

Product: Windows Operating System
ID: 4249
Source: Microsoft-Windows-MSDTC
Version: 6.0
Symbolic Name: IDS_DTC_TIP_SUBORDINATE_ACTIVE_RECEIVED_UNEXPECTED
Message: The MS DTC Transaction Manager received an unknown or unexpected TIP command (%1) for an Active transaction that is being coordinated by another transaction manager. The transaction has been aborted. Transaction specifics: External Transaction Manager Id “%2”; External Transaction Id “%3”; MS DTC TIP Transaction URL “%4”.%0

Resolve

This is a normal condition. No further action is required.

Related Management Information

Transactions Processing

Application Server

Related:

Event ID 4248 — Transactions Processing

Event ID 4248 — Transactions Processing

Updated: December 3, 2008

Applies To: Windows Server 2008 R2

The Microsoft Distributed Transaction Coordinator service (MSDTC) can coordinate transactions for a variety of protocols.

Event Details

Product: Windows Operating System
ID: 4248
Source: Microsoft-Windows-MSDTC
Version: 6.1
Symbolic Name: IDS_DTC_TIP_SUBORDINATE_ACTIVE_RECEIVED_ERROR
Message: The MS DTC Transaction Manager received a TIP “ERROR COMMAND” for an Active transaction that is being coordinated by another transaction manager. The transaction has been aborted. Transaction specifics: External Transaction Manager Id “%1”; External Transaction URL “%2”; MS DTC TIP Transaction URL “%3”.%0

Resolve

This is a normal condition. No further action is required.

Related Management Information

Transactions Processing

Application Server

Related:

Event ID 4246 — Transactions Processing

Event ID 4246 — Transactions Processing

Updated: February 22, 2008

Applies To: Windows Server 2008

The Microsoft Distributed Transaction Coordinator service (MSDTC) can coordinate transactions for a variety of protocols.

Event Details

Product: Windows Operating System
ID: 4246
Source: Microsoft-Windows-MSDTC
Version: 6.0
Symbolic Name: IDS_DTC_TIP_RECEIVED_ERROR
Message: The MS DTC Transaction Manager sent a TIP “COMMIT, QUERY, or RECONNECT COMMAND” to another transaction manager and received a TIP “ERROR COMMAND” in response. Transaction specifics: External Transaction Manager Id %2; External Transaction URL “%3”; MS DTC TIP Transaction URL “%4”.%0

Resolve

This is a normal condition. No further action is required.

Related Management Information

Transactions Processing

Application Server

Related:

Event ID 4244 — Transactions Processing

Event ID 4244 — Transactions Processing

Updated: February 22, 2008

Applies To: Windows Server 2008

The Microsoft Distributed Transaction Coordinator service (MSDTC) can coordinate transactions for a variety of protocols.

Event Details

Product: Windows Operating System
ID: 4244
Source: Microsoft-Windows-MSDTC
Version: 6.0
Symbolic Name: IDS_DTC_TIP_PREPARE_RECEIVED_ERROR
Message: The MS DTC Transaction Manager sent a TIP “PREPARE COMMAND” to another transaction manager and received a TIP “ERROR COMMAND” in response. The transaction has been aborted. Transaction specifics: External TM ID %1; External Transaction URL “%2”; MS DTC TIP Transaction URL “%3”.%0

Resolve

This is a normal condition. No further action is required.

Related Management Information

Transactions Processing

Application Server

Related:

Event ID 4241 — Transactions Processing

Event ID 4241 — Transactions Processing

Updated: December 3, 2008

Applies To: Windows Server 2008 R2

The Microsoft Distributed Transaction Coordinator service (MSDTC) can coordinate transactions for a variety of protocols.

Event Details

Product: Windows Operating System
ID: 4241
Source: Microsoft-Windows-MSDTC
Version: 6.1
Symbolic Name: IDS_DTC_TIP_ABORT_RECEIVED_UNEXPECTED
Message: The MS DTC Transaction Manager sent a TIP “ABORT COMMAND” to another transaction manager and received an unknown or unexpected TIP command (%1) in response. The transaction has been aborted. Transaction specifics: External Transaction Manager Id “%2”; External Transaction URL “%3”; MS DTC TIP Transaction URL “%4”.%0

Resolve

This is a normal condition. No further action is required.

Related Management Information

Transactions Processing

Application Server

Related:

Event ID 4240 — Transactions Processing

Event ID 4240 — Transactions Processing

Updated: February 22, 2008

Applies To: Windows Server 2008

The Microsoft Distributed Transaction Coordinator service (MSDTC) can coordinate transactions for a variety of protocols.

Event Details

Product: Windows Operating System
ID: 4240
Source: Microsoft-Windows-MSDTC
Version: 6.0
Symbolic Name: IDS_DTC_TIP_ABORT_RECEIVED_ERROR
Message: The MS DTC Transaction Manager sent a TIP “ABORT COMMAND” to another transaction manager and received a TIP “ERROR COMMAND” in response. The transaction has been aborted. Transaction specifics: External Transaction Manager Id “%1”; External Transaction URL “%2”; MS DTC TIP Transaction URL “%3”.%0

Resolve

This is a normal condition. No further action is required.

Related Management Information

Transactions Processing

Application Server

Related:

Event ID 4193 — Transactions Processing

Event ID 4193 — Transactions Processing

Updated: February 22, 2008

Applies To: Windows Server 2008

The Microsoft Distributed Transaction Coordinator service (MSDTC) can coordinate transactions for a variety of protocols.

Event Details

Product: Windows Operating System
ID: 4193
Source: Microsoft-Windows-MSDTC
Version: 6.0
Symbolic Name: IDS_DTC_E_TMREENLISTMENTCOMPLETE_INDOUBT
Message: A resource manager performed recovery and called ReenlistmentComplete indicating that recovery was complete. However, there is at least one transaction that was enlisted with the resource manager whose state is still “In Doubt”%0

Resolve
Resolve the In Doubt transactions

The Microsoft Distributed Transaction Coordinator service (MSDTC) reported that the outcome for a transaction has a status of In Doubt. This means that there is no information available about the outcome of this transaction. This can happen if the connection between the MSDTC proxy and the transaction manager that is acting as the commit coordinator was lost. The transaction may have committed or not. MSDTC lost communication with that transaction manager after preparing, but before receiving, the information about the transaction’s outcome.

The transaction remains prepared and in doubt until communication is restored with the superior transaction manager. The system administrator can force the transaction to commit manually by using the Component Services administrative tool.

Ensure that all Resource Managers (RM) that enlist in MSDTC transactions are consistent. RMs operate with relational databases, Message Queuing, transactional files, and object-oriented databases. After you are sure that all RMs are consistent, commit the transaction manually.

To perform this procedure, you must have membership in Administrators, or you must have been delegated the appropriate authority.

To commit the transaction manually:

  1. Click Start, and then click Run.
  2. Type comexp.msc, and then click OK. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue.
  3. Click Component Services, click Computers, click My Computer, and then click Distributed Transaction Coordinator.
  4. Click Local DTC, and then click Transaction List.
  5. In the Transaction List, right-click the transaction with the status of In Doubt, point to Resolve, and then click Commit.

    When a transaction’s Commit outcome is forced (that is, when the transaction is committed manually), the transaction is designated as Forced Commit.

Verify

To perform this procedure, you must have membership in Administrators, or you must have been delegated the appropriate authority.

To verify that the Microsoft Distributed Transaction Coordinator service (MSDTC) is running properly:

  1. Click Start, and then click Command Prompt.
  2. At the command prompt, type sc query msdtc, and then press ENTER.
  3. The system responds with information about the service. Confirm that these two items appear: SERVICE_NAME: msdtc and STATE : 4 RUNNING.

Related Management Information

Transactions Processing

Application Server

Related:

Commit and roll-back with micro-services.

Often a business goal is achieved when multiple resources are updated in sequence, parallel, etc. In terms of microservices, perhaps, it means to have services that update **a particular** resource (data store, messaging items, etc.) only. Otherwise, a microservice will no longer remain granular. But, this brings up the challenge of synchronizing the updates across different services (e.g. 2-phase commit protocol) so that, the “before-and-after” scenarios of the resources are consistent.

With multiple, independent micro-services, how is this synchronizing enforced? One option could be to bring all these services under an ESB (e.g. IBM IIB); but, that is a monolithic service. Yet another option is to implement a consensus protocol such as [Raft][1]. What are some of the known practices?

[1]: https://raft.github.io/

Related: