diff --git a/include/leveldb/env.h b/include/leveldb/env.h index add51a5d..95f59108 100644 --- a/include/leveldb/env.h +++ b/include/leveldb/env.h @@ -83,9 +83,9 @@ class Env { WritableFile** result) = 0; // Riak specific: - // Derived from NewWritableFile. Special version of - // NewWritableFile that enables write and close operations - // to execute on background threads (where supported). + // Allows for virtualized version of NewWritableFile that enables write + // and close operations to execute on background threads + // (where platform supported). // // The returned file will only be accessed by one thread at a time. virtual Status NewWriteOnlyFile(const std::string& fname, diff --git a/util/env_posix.cc b/util/env_posix.cc index 791272a6..59c9d063 100644 --- a/util/env_posix.cc +++ b/util/env_posix.cc @@ -1079,11 +1079,11 @@ void BGFileCloser(void * arg) if (0 != file_ptr->unused_) { ret_val=ftruncate(file_ptr->fd_, file_ptr->offset_ + file_ptr->length_ - file_ptr->unused_); - if (0!=ret_val) - { - syslog(LOG_ERR,"BGFileCloser ftruncate failed [%d, %m]", errno); - err_flag=true; - } // if + if (0!=ret_val) + { + syslog(LOG_ERR,"BGFileCloser ftruncate failed [%d, %m]", errno); + err_flag=true; + } // if } close(file_ptr->fd_); @@ -1122,38 +1122,38 @@ void BGFileCloser2(void * arg) { // must fdatasync for DONTNEED to work ret_val=fdatasync(file_ptr->fd_); - if (0!=ret_val) - { - syslog(LOG_ERR,"BGFileCloser2 fdatasync failed [%d, %m]", errno); - err_flag=true; - } // if + if (0!=ret_val) + { + syslog(LOG_ERR,"BGFileCloser2 fdatasync failed [%d, %m]", errno); + err_flag=true; + } // if ret_val=posix_fadvise(file_ptr->fd_, file_ptr->offset_, file_ptr->length_, POSIX_FADV_DONTNEED); - if (0!=ret_val) - { - syslog(LOG_ERR,"BGFileCloser2 posix_fadvise DONTNEED failed [%d, %m]", errno); - err_flag=true; - } // if + if (0!=ret_val) + { + syslog(LOG_ERR,"BGFileCloser2 posix_fadvise DONTNEED failed [%d, %m]", errno); + err_flag=true; + } // if } // if else { ret_val=posix_fadvise(file_ptr->fd_, file_ptr->offset_, file_ptr->length_, POSIX_FADV_WILLNEED); - if (0!=ret_val) - { - syslog(LOG_ERR,"BGFileCloser2 posix_fadvise WILLNEED failed [%d, %m]", errno); - err_flag=true; - } // if + if (0!=ret_val) + { + syslog(LOG_ERR,"BGFileCloser2 posix_fadvise WILLNEED failed [%d, %m]", errno); + err_flag=true; + } // if } // else #endif if (0 != file_ptr->unused_) { ret_val=ftruncate(file_ptr->fd_, file_ptr->offset_ + file_ptr->length_ - file_ptr->unused_); - if (0!=ret_val) - { - syslog(LOG_ERR,"BGFileCloser2 ftruncate failed [%d, %m]", errno); - err_flag=true; - } // if + if (0!=ret_val) + { + syslog(LOG_ERR,"BGFileCloser2 ftruncate failed [%d, %m]", errno); + err_flag=true; + } // if } close(file_ptr->fd_); delete file_ptr; diff --git a/util/perf_count.cc b/util/perf_count.cc index 2aa86c15..7aee5d99 100644 --- a/util/perf_count.cc +++ b/util/perf_count.cc @@ -515,7 +515,7 @@ PerformanceCounters * gPerfCounters(&LocalStartupCounters); "ThrottleKeys1", "ThrottleBacklog1", "ThrottleCompacts1", - "BGWriteError" + "BGWriteError" };