~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/transaction_log/transaction_log.h

  • Committer: lbieber
  • Date: 2010-08-23 22:45:16 UTC
  • mfrom: (1727.2.1 staging)
  • Revision ID: lbieber@orisndriz03-20100823224516-k12j5r4znqnznr9d
Merge Vijay - bug 621866 - Changed --transaction-log.sync-method to --transaction-log.flush-frequency
Merge Lee - bug 622005 updateing test results that need to sorted by adding --sorted_result - 
Merge Andrew - bug #617537 re-connect connectionID is wrong 
Merge Andrew - bug #617534 incorrect error when reconnecting

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
    ONLINE,
62
62
    WRITING
63
63
  };
64
 
  static const uint32_t SYNC_METHOD_OS= 0; ///< Rely on operating system to sync log file
65
 
  static const uint32_t SYNC_METHOD_EVERY_WRITE= 1; //< Sync on every write to the log file
66
 
  static const uint32_t SYNC_METHOD_EVERY_SECOND= 2; ///< Sync no more than once a second
 
64
  static const uint32_t FLUSH_FREQUENCY_OS= 0; ///< Rely on operating system to sync log file
 
65
  static const uint32_t FLUSH_FREQUENCY_EVERY_WRITE= 1; //< Sync on every write to the log file
 
66
  static const uint32_t FLUSH_FREQUENCY_EVERY_SECOND= 2; ///< Sync no more than once a second
67
67
public:
68
68
  TransactionLog(const std::string in_log_file_path,
69
 
                 uint32_t in_sync_method,
 
69
                 uint32_t in_flush_frequency,
70
70
                 bool in_do_checksum);
71
71
 
72
72
  /** Destructor */
189
189
  void clearError();
190
190
  /**
191
191
   * Helper method which synchronizes/flushes the transaction log file
192
 
   * according to the transaction_log_sync_method system variable
 
192
   * according to the transaction_log_flush_frequency system variable
193
193
   *
194
194
   * @retval
195
195
   *   0 == Success
205
205
  drizzled::atomic<off_t> log_offset; ///< Offset in log file where log will write next command
206
206
  bool has_error; ///< Is the log in error?
207
207
  std::string error_message; ///< Current error message
208
 
  uint32_t sync_method; ///< Determines behaviour of syncing log file
209
 
  time_t last_sync_time; ///< Last time the log file was synced (only set in SYNC_METHOD_EVERY_SECOND)
 
208
  uint32_t flush_frequency; ///< Determines behaviour of syncing log file
 
209
  time_t last_sync_time; ///< Last time the log file was synced (only set in FLUSH_FREQUENCY_EVERY_SECOND)
210
210
  bool do_checksum; ///< Do a CRC32 checksum when writing Transaction message to log?
211
211
};
212
212