Permalink
Browse files

Refined transaction protocol. Removed unused services and messages. I…

… 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...
1 parent 5885182 commit f29cc170d2b0e27af78a56a86957883370aaca75 @apavlo committed Sep 30, 2011
Showing with 23 additions and 46 deletions.
  1. +23 −46 src/protorpc/edu/brown/hstore/hstore.proto
@@ -92,6 +92,8 @@ message TransactionFinishRequest {
ABORT_USER = 2;
// The transaction aborted because of a misprediction (and will be restarted)
ABORT_MISPREDICT = 3;
+ // The transaction could not be initialized because on partition rejected it.
+ ABORT_REJECT = 4;
}
// Globally unique transaction id
@@ -106,56 +108,34 @@ message TransactionFinishResponse {
}
// -----------------------------------
-// MESSAGES
+// TRANSACTION REDIRECT MESSAGE
// -----------------------------------
-enum MessageType {
- STATUS = 0;
- 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;
+message TransactionRedirectRequest {
+ required int32 sender_id = 1;
required bytes work = 2;
-
- // If true then the fragment must be undoable using a call to Finish.
- required bool undoable = 3;
+ optional int64 orig_txn_id = 3;
}
-message FragmentDependency {
- required int32 dependency_id = 1;
- required bytes data = 2;
+message TransactionRedirectResponse {
+ // The id of the HStoreSite is responding to this shutdown request
+ required int32 sender_id = 1;
+ required bytes output = 2;
+ optional int64 orig_txn_id = 3;
}
-message FragmentTransfer {
- required int32 sender_partition_id = 1;
- required int32 dest_partition_id = 2;
- required int64 txn_id = 3;
- repeated FragmentDependency dependencies = 4;
+// -----------------------------------
+// SHUTDOWN MESSAGE
+// -----------------------------------
+
+message ShutdownRequest {
+ // The id of the HStoreSite that is wants us to shutdown
+ required int32 sender_id = 1;
}
-message FragmentAcknowledgement {
- required int32 sender_partition_id = 1;
- required int32 dest_partition_id = 2;
- required int64 txn_id = 3;
+message ShutdownResponse {
+ // The id of the HStoreSite is responding to this shutdown request
+ required int32 sender_id = 1;
}
// -----------------------------------
@@ -166,9 +146,6 @@ service HStoreService {
rpc TransactionInit(TransactionInitRequest) returns (TransactionInitResponse);
rpc TransactionWork(TransactionWorkRequest) returns (TransactionWorkResponse);
rpc TransactionFinish(TransactionFinishRequest) returns (TransactionFinishResponse);
-
- // TODO: Break the original HStoreMessenger services out into separate rpcs per MessageType
- rpc SendMessage(MessageRequest) returns (MessageAcknowledgement);
- // TODO: REMOVE
- rpc SendFragment (FragmentTransfer) returns (FragmentAcknowledgement);
+ rpc TransactionRedirect(TransactionRedirectRequest) returns (TransactionRedirectResponse);
+ rpc Shutdown(ShutdownRequest) returns (ShutdownResponse);
}

0 comments on commit f29cc17

Please sign in to comment.