~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/message/event.proto

* Fixes drizzled's atomics:

- fetch_and_add() was actually add_and_fetch() - fixed to have both methods correct
- compare_and_swap() was incorrect for all traits classes.  Fixed to return a bool
true only when the supplied value is actually swapped
- fixes increment() and decrement() methods and operator+=() in outer atomics class
template to call proper add_and_fetch() methods on traits classes
- Now that above are fixed, removed the hacks in Query_id and TransactionLog to
have query ID and the new transactoin ID start properly at 1.

* Transaction messages sent over replication stream now use
a real transaction ID, managed by drizzled::TransactionServices.  Previously, 
the Query_id was being used, resulting in SELECT statements incrementing the
transaction ID.

* Added a test case to ensure that DDL ops are given a transaction ID and SELECT
ops do not increment the transaction ID.

The transaction ID will be paired with a channel ID to become the global
transaction identifier.  ReplicationServices will manage the pairing of
channel and transaction ID and understand how far a particular subscriber
node has applied.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
  Represents events on the server
3
 
*/
4
 
package drizzled.message;
5
 
option optimize_for = SPEED;
6
 
 
7
 
option java_package = "org.drizzle.messages";
8
 
option java_outer_classname = "EventMessage";
9
 
 
10
 
 
11
 
/*
12
 
 * An Event message can represent any Drizzle related action that
13
 
 * a replication stream reader may be interested in, such as starting
14
 
 * up or shutting down Drizzle.
15
 
 */
16
 
message Event
17
 
{
18
 
  enum Type
19
 
  {
20
 
    STARTUP = 0;         /* Drizzle startup */
21
 
    SHUTDOWN = 1;        /* Normal Drizzle shutdown */
22
 
  }
23
 
 
24
 
  required Type type = 1;
25
 
}