~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/message/replication.proto

This patch does a few things:

* Renames the TransactionServices component in the kernel
  to ReplicationServices.
* Renames the transaction.proto to replication proto and
  updates the various programs referencing drizzled/message/transaction.pb.h
* Adds a public method to the kernel's ReplicationServices component:
  getLastAppliedTimestamp() which returns the timestamp of the last Command message
  which was successfully sent to a registered Applier plugin (the Command was "applied")
* Updates ReplicationServices::push() method to update an atomic timestamp
  when a Command is successfully applied by a replicator to an applier.

The ReplicationServices::getLastAppliedTimestamp() is critical to the upcoming
Publisher plugin, as it allows the publisher to ask the kernel when the last Command
message was applied.

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
  required uint64 end_timestamp = 3;
87
87
  repeated Command command = 4;
88
88
}
 
89
 
 
90
/*
 
91
 * Describes a server used in replication.  This message
 
92
 * class is passed in the Publisher::registerSubscriber()
 
93
 * and Subscriber::subscribe() methods.
 
94
 */
 
95
message Server
 
96
{
 
97
  required int32 server_id = 1; /* A unique numeric identifier for this server */
 
98
  required string ip_address = 2; /* A valid IP address */
 
99
  required uint32 port = 3; /* Port that this server is listening for replication events */
 
100
  optional string name = 4; /* Optional name for the server */
 
101
}
 
102
 
 
103
/*
 
104
 * A subscriber manifest describes the state of
 
105
 * a subscriber in replication.  This message class
 
106
 * is passed in the replication API in the 
 
107
 * drizzled::plugin::Publisher's dataIsAvailable() and
 
108
 * pullData() calls.
 
109
 */
 
110
message SubscriberManifest
 
111
{
 
112
  required int32 server_id = 1; /* Only need to pass the ID...not the whole Server message */
 
113
  required uint64 last_applied_timestamp = 2; /* The timestamp of the last time this subscriber communicated with the publisher */
 
114
  required int64 last_applied_transaction_id = 3; /* The timestamp of last applied transaction or command */
 
115
}