mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 23:04:20 +01:00
Merge r18221. No substantial changes. Refs #2467. [t:2467].
git-svn-id: file:///svn/toku/tokudb@18651 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
e21e3b6328
commit
9fb8e42bac
1 changed files with 15 additions and 2 deletions
|
@ -67,8 +67,8 @@ int toku_logger_create (TOKULOGGER *resultp) {
|
|||
r = toku_pthread_cond_init(&result->output_condition, NULL); if (r!=0) goto panic;
|
||||
result->input_lock_ctr = 0;
|
||||
result->output_condition_lock_ctr = 0;
|
||||
result->output_is_available = TRUE;
|
||||
result->swap_ctr = 0;
|
||||
result->output_is_available = TRUE;
|
||||
return 0;
|
||||
|
||||
panic:
|
||||
|
@ -327,7 +327,6 @@ write_outbuf_to_logfile (TOKULOGGER logger, LSN *fsynced_lsn)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
toku_logger_make_space_in_inbuf (TOKULOGGER logger, int n_bytes_needed)
|
||||
// Entry: Holds the inlock
|
||||
|
@ -594,6 +593,20 @@ void toku_logger_trim_log_files (TOKULOGGER logger, BOOL trim_log_files)
|
|||
logger->trim_log_files = trim_log_files;
|
||||
}
|
||||
|
||||
double get_tdiff(void) {
|
||||
static struct timeval prev={0,0};
|
||||
if (prev.tv_sec==0) {
|
||||
gettimeofday(&prev, 0);
|
||||
return 0.0;
|
||||
} else {
|
||||
struct timeval now;
|
||||
gettimeofday(&now, 0);
|
||||
double diff = now.tv_sec - prev.tv_sec + 1e-6*(now.tv_usec - prev.tv_usec);
|
||||
prev = now;
|
||||
return diff;
|
||||
}
|
||||
}
|
||||
|
||||
int toku_logger_maybe_fsync (TOKULOGGER logger, LSN lsn, int do_fsync)
|
||||
// Effect: If fsync is nonzero, then make sure that the log is flushed and synced at least up to lsn.
|
||||
// Entry: Holds input lock. The log entry has already been written to the input buffer.
|
||||
|
|
Loading…
Add table
Reference in a new issue