Skip to content

Commit

Permalink
Refined transaction protocol. Removed unused services and messages. I…
Browse files Browse the repository at this point in the history
… think this is solid now. Let's write some java code!!!

git-svn-id: https://database.cs.brown.edu/svn/hstore/branches/newdtxn-branch@2366 7a8f3d5b-8c5f-44cb-9125-2414a256df87
  • Loading branch information
apavlo committed Sep 30, 2011
1 parent 5885182 commit f29cc17
Showing 1 changed file with 23 additions and 46 deletions.
69 changes: 23 additions & 46 deletions src/protorpc/edu/brown/hstore/hstore.proto
Expand Up @@ -92,6 +92,8 @@ message TransactionFinishRequest {
ABORT_USER = 2; ABORT_USER = 2;
// The transaction aborted because of a misprediction (and will be restarted) // The transaction aborted because of a misprediction (and will be restarted)
ABORT_MISPREDICT = 3; ABORT_MISPREDICT = 3;
// The transaction could not be initialized because on partition rejected it.
ABORT_REJECT = 4;
} }


// Globally unique transaction id // Globally unique transaction id
Expand All @@ -106,56 +108,34 @@ message TransactionFinishResponse {
} }


// ----------------------------------- // -----------------------------------
// MESSAGES // TRANSACTION REDIRECT MESSAGE
// ----------------------------------- // -----------------------------------


enum MessageType { message TransactionRedirectRequest {
STATUS = 0; required int32 sender_id = 1;
SHUTDOWN = 1;
FORWARD_TXN = 2;
DONE_PARTITIONS = 3;
}

message MessageRequest {
required int32 sender_site_id = 1;
required int32 dest_site_id = 2;
required MessageType type = 3;
optional bytes data = 4;
optional int64 txn_id = 5;
repeated int32 partitions = 6 [packed=true];
}

message MessageAcknowledgement {
required int32 sender_site_id = 1;
required int32 dest_site_id = 2;
optional bytes data = 3;
optional int64 txn_id = 4;
}

message Fragment {
required int32 transaction_id = 1;
required bytes work = 2; required bytes work = 2;

optional int64 orig_txn_id = 3;
// If true then the fragment must be undoable using a call to Finish.
required bool undoable = 3;
} }


message FragmentDependency { message TransactionRedirectResponse {
required int32 dependency_id = 1; // The id of the HStoreSite is responding to this shutdown request
required bytes data = 2; required int32 sender_id = 1;
required bytes output = 2;
optional int64 orig_txn_id = 3;
} }


message FragmentTransfer { // -----------------------------------
required int32 sender_partition_id = 1; // SHUTDOWN MESSAGE
required int32 dest_partition_id = 2; // -----------------------------------
required int64 txn_id = 3;
repeated FragmentDependency dependencies = 4; message ShutdownRequest {
// The id of the HStoreSite that is wants us to shutdown
required int32 sender_id = 1;
} }


message FragmentAcknowledgement { message ShutdownResponse {
required int32 sender_partition_id = 1; // The id of the HStoreSite is responding to this shutdown request
required int32 dest_partition_id = 2; required int32 sender_id = 1;
required int64 txn_id = 3;
} }


// ----------------------------------- // -----------------------------------
Expand All @@ -166,9 +146,6 @@ service HStoreService {
rpc TransactionInit(TransactionInitRequest) returns (TransactionInitResponse); rpc TransactionInit(TransactionInitRequest) returns (TransactionInitResponse);
rpc TransactionWork(TransactionWorkRequest) returns (TransactionWorkResponse); rpc TransactionWork(TransactionWorkRequest) returns (TransactionWorkResponse);
rpc TransactionFinish(TransactionFinishRequest) returns (TransactionFinishResponse); rpc TransactionFinish(TransactionFinishRequest) returns (TransactionFinishResponse);

rpc TransactionRedirect(TransactionRedirectRequest) returns (TransactionRedirectResponse);
// TODO: Break the original HStoreMessenger services out into separate rpcs per MessageType rpc Shutdown(ShutdownRequest) returns (ShutdownResponse);
rpc SendMessage(MessageRequest) returns (MessageAcknowledgement);
// TODO: REMOVE
rpc SendFragment (FragmentTransfer) returns (FragmentAcknowledgement);
} }

0 comments on commit f29cc17

Please sign in to comment.