Commit f5d76ac4 authored by Yoni Fogel's avatar Yoni Fogel

refs #4964 cleanup during review

git-svn-id: file:///svn/toku/tokudb@44940 c7de825b-a66e-492c-adef-691d508d4ae1
parent c0378260
......@@ -245,14 +245,8 @@ env_fs_redzone(DB_ENV *env, uint64_t total) {
// Check the available space in the file systems used by tokudb and erect barriers when available space gets low.
static int
env_fs_poller(void *arg) {
if (0) printf("%s:%d %p\n", __FUNCTION__, __LINE__, arg);
DB_ENV *env = (DB_ENV *) arg;
int r;
#if 0
// get the cachetable size limit (not yet needed)
uint64_t cs = toku_cachetable_get_size_limit(env->i->cachetable);
#endif
int in_yellow; // set true to issue warning to user
int in_red; // set true to prevent certain operations (returning ENOSPC)
......@@ -261,7 +255,6 @@ env_fs_poller(void *arg) {
uint64_t avail_size, total_size;
r = toku_get_filesystem_sizes(env->i->dir, &avail_size, NULL, &total_size);
assert(r == 0);
if (0) fprintf(stderr, "%s %"PRIu64" %"PRIu64"\n", env->i->dir, avail_size, total_size);
in_yellow = (avail_size < 2 * env_fs_redzone(env, total_size));
in_red = (avail_size < env_fs_redzone(env, total_size));
......@@ -269,7 +262,6 @@ env_fs_poller(void *arg) {
if (strcmp(env->i->dir, env->i->real_data_dir) != 0) {
r = toku_get_filesystem_sizes(env->i->real_data_dir, &avail_size, NULL, &total_size);
assert(r == 0);
if (0) fprintf(stderr, "%s %"PRIu64" %"PRIu64"\n", env->i->real_data_dir, avail_size, total_size);
in_yellow += (avail_size < 2 * env_fs_redzone(env, total_size));
in_red += (avail_size < env_fs_redzone(env, total_size));
}
......@@ -278,7 +270,6 @@ env_fs_poller(void *arg) {
if (strcmp(env->i->dir, env->i->real_log_dir) != 0 && strcmp(env->i->real_data_dir, env->i->real_log_dir) != 0) {
r = toku_get_filesystem_sizes(env->i->real_log_dir, &avail_size, NULL, &total_size);
assert(r == 0);
if (0) fprintf(stderr, "%s %"PRIu64" %"PRIu64"\n", env->i->real_log_dir, avail_size, total_size);
in_yellow += (avail_size < 2 * env_fs_redzone(env, total_size));
in_red += (avail_size < env_fs_redzone(env, total_size));
}
......
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