~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pbxt/src/restart_xt.cc

Merge Paul

Show diffs side-by-side

added added

removed removed

Lines of Context:
2578
2578
 
2579
2579
xtBool XTXactRestart::xres_is_checkpoint_pending(xtLogID curr_log_id, xtLogOffset curr_log_offset)
2580
2580
{
2581
 
        return xt_bytes_since_last_checkpoint(xres_db, curr_log_id, curr_log_offset) >= xt_db_checkpoint_frequency / 2;
 
2581
        return xt_bytes_since_last_checkpoint(xres_db, curr_log_id, curr_log_offset) >= xt_db_checkpoint_frequency;
2582
2582
}
2583
2583
 
2584
2584
/*
2888
2888
        u_int                           curr_writer_total;
2889
2889
        time_t                          now, last_index_flush;
2890
2890
        xtBool                          async = TRUE;
 
2891
        xtXactID                        sweep_count;
2891
2892
 
2892
2893
        xt_set_low_priority(self);
2893
2894
 
2916
2917
                 * And if the sweeper is not idle, then there is also activity!
2917
2918
                 * And if the writer is active, then we should wait for it as well!
2918
2919
                 */
 
2920
#ifdef XT_SWEEPER_SORT_XACTS
 
2921
                sweep_count = db->db_xn_curr_id + 1 - db->db_sw_to_add + db->db_sw_list_size;
 
2922
#else
 
2923
                sweep_count = db->db_xn_curr_id + 1 - db->db_xn_to_clean_id;
 
2924
#endif
2919
2925
                if (!db->db_xn_long_running_count && 
2920
2926
                        curr_writer_total == db->db_xn_total_writer_count && 
 
2927
                        !sweep_count &&
2921
2928
                        db->db_sw_idle == XT_THREAD_IDLE && 
2922
2929
                        db->db_wr_idle == XT_THREAD_IDLE) {
2923
2930
                        /* No activity in 2 seconds: */