Commit 01bbb5f8 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:5875], some stylistic changes

git-svn-id: file:///svn/toku/tokudb@43464 c7de825b-a66e-492c-adef-691d508d4ae1
parent 80a655ba
...@@ -5479,22 +5479,24 @@ toku_brt_stat64 (BRT brt, TOKUTXN UU(txn), struct brtstat64_s *s) { ...@@ -5479,22 +5479,24 @@ toku_brt_stat64 (BRT brt, TOKUTXN UU(txn), struct brtstat64_s *s) {
assert(brt->h); assert(brt->h);
{ {
int64_t file_size; int64_t file_size;
int fd = toku_cachefile_get_and_pin_fd(brt->h->cf); int fd = toku_cachefile_get_and_pin_fd(brt->h->cf);
int r = toku_os_get_file_size(fd, &file_size); int r = toku_os_get_file_size(fd, &file_size);
toku_cachefile_unpin_fd(brt->h->cf); toku_cachefile_unpin_fd(brt->h->cf);
assert_zero(r); assert_zero(r);
s->fsize = file_size + toku_cachefile_size_in_memory(brt->h->cf); s->fsize = file_size + toku_cachefile_size_in_memory(brt->h->cf);
} }
// just use the in memory stats from the header // just use the in memory stats from the header
// prevent appearance of negative numbers for numrows, numbytes // prevent appearance of negative numbers for numrows, numbytes
int64_t n = brt->h->in_memory_stats.numrows; int64_t n = brt->h->in_memory_stats.numrows;
if (n < 0) if (n < 0) {
n = 0; n = 0;
}
s->nkeys = s->ndata = n; s->nkeys = s->ndata = n;
n = brt->h->in_memory_stats.numbytes; n = brt->h->in_memory_stats.numbytes;
if (n < 0) if (n < 0) {
n = 0; n = 0;
}
s->dsize = n; s->dsize = n;
// 4018 // 4018
......
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