[CONTROLLER-980] Clustering: Handle Shard transaction backwards compatibility Created: 01/Nov/14  Updated: 03/Nov/14  Resolved: 03/Nov/14

Status: Resolved
Project: controller
Component/s: mdsal
Affects Version/s: Helium
Fix Version/s: None

Type: Bug
Reporter: Tom Pantelis Assignee: Tom Pantelis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 2294

 Description   

Recent changes to the Shard 3-phase commit handling makes it incompatible with base Helium. We need to maintain backwards compatibility.

The incompatibility is a result of a transactionId field added to the CanCommitTransaction, CommitTransaction, AbortTransaction protobuf messages.

Solution:

  • In CanCommitTransaction, CommitTransaction, AbortTransaction protobuf messages make the transactionId field optional.
  • Add an optional version # field to the CreateTransaction protobuf message. A base Helium node wouldn't set the version so it will be 0.
  • Pass the CreateTransaction version # to the ShardTransaction.
  • On ReadyTransaction message, the ShardTransaction sends the version # with the ForwardedReadyTransaction message to the Shard.
  • In the Shard, on ForwardedReadyTransaction, if the version # < 1 (Helium-1 version), create a BackardsCompatibleThreePhaseCohort actor with the transactionId and pass its actor ref back in the response. Otherwise pass the Shard actor ref back as it currently does.
  • In BackardsCompatibleThreePhaseCommitCohort, on CanCommitTransaction, CommitTransaction, AbortTransaction messages, since the transactionId will be null or empty, create a new message with the cached transactionId and forward it to the Shard. Everything should work as is from there.


 Comments   
Comment by Tom Pantelis [ 02/Nov/14 ]

Submitted https://git.opendaylight.org/gerrit/#/c/12444/

Generated at Wed Feb 07 19:54:22 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.