Commit 5a5fca31 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

assert on ENOSPC for now on main refs[t:2436]

git-svn-id: file:///svn/toku/tokudb@18371 c7de825b-a66e-492c-adef-691d508d4ae1
parent 473fc53f
...@@ -14,7 +14,7 @@ static uint64_t get_tnow(void) { ...@@ -14,7 +14,7 @@ static uint64_t get_tnow(void) {
return tv.tv_sec * 1000000ULL + tv.tv_usec; return tv.tv_sec * 1000000ULL + tv.tv_usec;
} }
#define DO_ASSERT_ON_ENOSPC 0 #define DO_ASSERT_ON_ENOSPC 1
static const int toku_write_enospc_sleep = 1; static const int toku_write_enospc_sleep = 1;
static uint64_t toku_write_enospc_last_report; static uint64_t toku_write_enospc_last_report;
...@@ -49,6 +49,7 @@ try_again_after_handling_write_error(int fd, size_t len, ssize_t r_write) { ...@@ -49,6 +49,7 @@ try_again_after_handling_write_error(int fd, size_t len, ssize_t r_write) {
} }
case ENOSPC: { case ENOSPC: {
#if DO_ASSERT_ON_ENOSPC #if DO_ASSERT_ON_ENOSPC
toku_write_enospc_last_report = get_tnow();
char err_msg[sizeof("Failed write of [] bytes to fd=[].") + 20+10]; //64 bit is 20 chars, 32 bit is 10 chars char err_msg[sizeof("Failed write of [] bytes to fd=[].") + 20+10]; //64 bit is 20 chars, 32 bit is 10 chars
snprintf(err_msg, sizeof(err_msg), "Failed write of [%"PRIu64"] bytes to fd=[%d].", (uint64_t)len, fd); snprintf(err_msg, sizeof(err_msg), "Failed write of [%"PRIu64"] bytes to fd=[%d].", (uint64_t)len, fd);
perror(err_msg); perror(err_msg);
......
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