From d560f9c9a4c2552481a9740889b55786916dbd90 Mon Sep 17 00:00:00 2001 From: Barry Perlman Date: Tue, 16 Apr 2013 23:57:50 -0400 Subject: [PATCH] Addresses #1697 Incorrect value was used to set new file size in logic that shrinks files (to free disk space) when possible. git-svn-id: file:///svn/toku/tokudb@11340 c7de825b-a66e-492c-adef-691d508d4ae1 --- newbrt/brt-serialize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newbrt/brt-serialize.c b/newbrt/brt-serialize.c index 18095569f69..691cbf3aba3 100644 --- a/newbrt/brt-serialize.c +++ b/newbrt/brt-serialize.c @@ -81,7 +81,7 @@ toku_maybe_truncate_cachefile (CACHEFILE cf, u_int64_t size_used) assert(file_size >= 0); } if ((u_int64_t)file_size >= size_used + (2*FILE_CHANGE_INCREMENT)) { - toku_off_t new_size = alignup(file_size, (2*FILE_CHANGE_INCREMENT)); //Truncate to new size_used. + toku_off_t new_size = alignup(size_used, (2*FILE_CHANGE_INCREMENT)); //Truncate to new size_used. assert(new_size < file_size); int r = toku_cachefile_truncate(cf, new_size); assert(r==0);