|
@@ -95,6 +95,7 @@ static int mod_init(void); /*!< Module initialization f
|
|
|
static void destroy(void); /*!< Module destroy function */
|
|
|
static void ul_core_timer(unsigned int ticks, void* param); /*!< Core timer handler */
|
|
|
static void ul_local_timer(unsigned int ticks, void* param); /*!< Local timer handler */
|
|
|
+static void ul_db_clean_timer(unsigned int ticks, void* param); /*!< DB clean timer handler */
|
|
|
static int child_init(int rank); /*!< Per-child init function */
|
|
|
static int mi_child_init(void);
|
|
|
|
|
@@ -166,6 +167,7 @@ int skip_remote_socket = 0; /*!< By default do not skip remote socket */
|
|
|
int ul_fetch_rows = 2000; /*!< number of rows to fetch from result */
|
|
|
int ul_hash_size = 10;
|
|
|
int ul_db_insert_null = 0;
|
|
|
+int ul_db_timer_clean = 0;
|
|
|
|
|
|
/* flags */
|
|
|
unsigned int nat_bflag = (unsigned int)-1;
|
|
@@ -233,6 +235,7 @@ static param_export_t params[] = {
|
|
|
{"db_raw_fetch_type", PARAM_INT, &ul_db_raw_fetch_type},
|
|
|
{"db_insert_null", PARAM_INT, &ul_db_insert_null},
|
|
|
{"server_id_filter", PARAM_INT, &ul_db_srvid},
|
|
|
+ {"db_timer_clean", PARAM_INT, &ul_db_timer_clean},
|
|
|
{0, 0, 0}
|
|
|
};
|
|
|
|
|
@@ -361,6 +364,11 @@ static int mod_init(void)
|
|
|
return -1;
|
|
|
}
|
|
|
}
|
|
|
+ if(db_mode==WRITE_THROUGH || db_mode==WRITE_BACK) {
|
|
|
+ if(ul_db_timer_clean!=0) {
|
|
|
+ sr_wtimer_add(ul_db_clean_timer, 0, timer_interval);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
if (nat_bflag==(unsigned int)-1) {
|
|
|
nat_bflag = 0;
|
|
@@ -518,6 +526,14 @@ static void ul_local_timer(unsigned int ticks, void* param)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+/*! \brief
|
|
|
+ * DB dlean timer handler
|
|
|
+ */
|
|
|
+static void ul_db_clean_timer(unsigned int ticks, void* param)
|
|
|
+{
|
|
|
+ ul_db_clean_udomains();
|
|
|
+}
|
|
|
+
|
|
|
/*! \brief
|
|
|
* preload module parameter handler
|
|
|
*/
|