~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/slave/replication_slave.h

  • Committer: David Shrewsbury
  • Date: 2011-03-09 17:10:06 UTC
  • mto: (2228.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2229.
  • Revision ID: shrewsbury.dave@gmail.com-20110309171006-ld90oph01m3rex5k
Persist --slave.max-commit-id value to applier_state table.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
 
42
42
  ReplicationSlave(const std::string &config)
43
43
    : drizzled::plugin::Daemon("Replication Slave"),
44
 
      _config_file(config)
 
44
      _config_file(config),
 
45
      _initial_max_commit_id(0)
45
46
  {}
46
47
  
47
48
  ~ReplicationSlave()
73
74
   */
74
75
  void setMaxCommitId(uint64_t value)
75
76
  {
76
 
    _producer.setMaxCommitId(value);
 
77
    /* must tell producer to set its cached value */
 
78
    _producer.setCachedMaxCommitId(value);
 
79
    /* setting this indicates that we should store it permanently */
 
80
    _initial_max_commit_id= value;
77
81
  }
78
82
 
79
83
private:
89
93
  /** I/O thread that will populate the work queue */
90
94
  boost::thread _producer_thread;
91
95
 
 
96
  uint64_t _initial_max_commit_id;
 
97
 
92
98
  /**
93
99
   * Initialize slave services with the given configuration file.
94
100
   *