Commit e59bc293 authored by Geoff Simmons's avatar Geoff Simmons

writer thread returns free lists before re-opening output, and after

a ready output timeout
parent 73d12385
...@@ -172,6 +172,7 @@ wrt_write(tx_t *tx) ...@@ -172,6 +172,7 @@ wrt_write(tx_t *tx)
AZ(pthread_mutex_lock(&reopen_lock)); AZ(pthread_mutex_lock(&reopen_lock));
if (reopen && fo != stdout) { if (reopen && fo != stdout) {
wrt_return_freelist();
if (fflush(fo) != 0) if (fflush(fo) != 0)
LOG_Log(LOG_ERR, "Cannot flush to %s, DATA DISCARDED: %s", LOG_Log(LOG_ERR, "Cannot flush to %s, DATA DISCARDED: %s",
config.output_file, strerror(errno)); config.output_file, strerror(errno));
...@@ -209,6 +210,7 @@ wrt_write(tx_t *tx) ...@@ -209,6 +210,7 @@ wrt_write(tx_t *tx)
} }
} }
else if (errnum == 0) { else if (errnum == 0) {
wrt_return_freelist();
LOG_Log(LOG_ERR, LOG_Log(LOG_ERR,
"Timeout waiting for ready output, DATA DISCARDED: %s", "Timeout waiting for ready output, DATA DISCARDED: %s",
VSB_data(os)); VSB_data(os));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment