|
|
@ -6267,7 +6267,7 @@ static bool reload_from(tv_t *start, const tv_t *finish) |
|
|
|
bool finished = false, ret = true, ok, apipe = false; |
|
|
|
bool finished = false, ret = true, ok, apipe = false; |
|
|
|
char *filename = NULL; |
|
|
|
char *filename = NULL; |
|
|
|
uint64_t count, total; |
|
|
|
uint64_t count, total; |
|
|
|
tv_t now, begin; |
|
|
|
tv_t now, begin, file_begin; |
|
|
|
double diff; |
|
|
|
double diff; |
|
|
|
FILE *fp = NULL; |
|
|
|
FILE *fp = NULL; |
|
|
|
int file_N_limit; |
|
|
|
int file_N_limit; |
|
|
@ -6296,6 +6296,7 @@ static bool reload_from(tv_t *start, const tv_t *finish) |
|
|
|
|
|
|
|
|
|
|
|
setnow(&now); |
|
|
|
setnow(&now); |
|
|
|
copy_tv(&begin, &now); |
|
|
|
copy_tv(&begin, &now); |
|
|
|
|
|
|
|
copy_tv(&file_begin, &now); |
|
|
|
tvs_to_buf(&now, run, sizeof(run)); |
|
|
|
tvs_to_buf(&now, run, sizeof(run)); |
|
|
|
snprintf(reload_buf, MAX_READ, "reload.%s.s0", run); |
|
|
|
snprintf(reload_buf, MAX_READ, "reload.%s.s0", run); |
|
|
|
LOGQUE(reload_buf, true); |
|
|
|
LOGQUE(reload_buf, true); |
|
|
@ -6348,10 +6349,15 @@ static bool reload_from(tv_t *start, const tv_t *finish) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
LOGWARNING("%s(): %sread %"PRIu64" line%s from %s", |
|
|
|
setnow(&now); |
|
|
|
|
|
|
|
diff = tvdiff(&now, &file_begin); |
|
|
|
|
|
|
|
if (diff == 0) |
|
|
|
|
|
|
|
diff = 1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LOGWARNING("%s(): %sread %"PRIu64" line%s %.2f/s from %s", |
|
|
|
__func__, |
|
|
|
__func__, |
|
|
|
everyone_die ? "Terminate, aborting - " : "", |
|
|
|
everyone_die ? "Terminate, aborting - " : "", |
|
|
|
count, count == 1 ? "" : "s", |
|
|
|
count, count == 1 ? "" : "s", (count / diff), |
|
|
|
filename); |
|
|
|
filename); |
|
|
|
total += count; |
|
|
|
total += count; |
|
|
|
if (apipe) { |
|
|
|
if (apipe) { |
|
|
@ -6404,8 +6410,10 @@ static bool reload_from(tv_t *start, const tv_t *finish) |
|
|
|
} |
|
|
|
} |
|
|
|
filename = hour_filename(restorefrom, restorename, reload_timestamp.tv_sec); |
|
|
|
filename = hour_filename(restorefrom, restorename, reload_timestamp.tv_sec); |
|
|
|
ok = logopen(&filename, &fp, &apipe); |
|
|
|
ok = logopen(&filename, &fp, &apipe); |
|
|
|
if (ok) |
|
|
|
if (ok) { |
|
|
|
|
|
|
|
setnow(&file_begin); |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
errno = 0; |
|
|
|
errno = 0; |
|
|
|
if (missing_count++ > 1) |
|
|
|
if (missing_count++ > 1) |
|
|
|
free(missinglast); |
|
|
|
free(missinglast); |
|
|
|