Skip to content

Commit

Permalink
Revert "Patch 7.6.1"
Browse files Browse the repository at this point in the history
  • Loading branch information
gitbw95 authored Aug 30, 2022
1 parent 35508f9 commit 4ae5e25
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 44 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,6 @@ set(SOURCES
util/slice.cc
util/file_checksum_helper.cc
util/status.cc
util/stderr_logger.cc
util/string_util.cc
util/thread_local.cc
util/threadpool_imp.cc
Expand Down
4 changes: 0 additions & 4 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# Rocksdb Change Log
## 7.6.1 (08/29/2022)
### Bug Fixes
* Fix a bug where `port/sys_time.h` cannot be imported for some build when it is included in `stderr_logger.h`.

## 7.6.0 (08/19/2022)
### New Features
* Added `prepopulate_blob_cache` to ColumnFamilyOptions. If enabled, prepopulate warm/hot blobs which are already in memory into blob cache at the time of flush. On a flush, the blob that is in memory (in memtables) get flushed to the device. If using Direct IO, additional IO is incurred to read this blob back into memory again, which is avoided by enabling this option. This further helps if the workload exhibits high temporal locality, where most of the reads go to recently written data. This also helps in case of the remote file system since it involves network traffic and higher latencies.
Expand Down
2 changes: 0 additions & 2 deletions TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ cpp_library_wrapper(name="rocksdb_lib", srcs=[
"util/ribbon_config.cc",
"util/slice.cc",
"util/status.cc",
"util/stderr_logger.cc",
"util/string_util.cc",
"util/thread_local.cc",
"util/threadpool_imp.cc",
Expand Down Expand Up @@ -590,7 +589,6 @@ cpp_library_wrapper(name="rocksdb_whole_archive_lib", srcs=[
"util/ribbon_config.cc",
"util/slice.cc",
"util/status.cc",
"util/stderr_logger.cc",
"util/string_util.cc",
"util/thread_local.cc",
"util/threadpool_imp.cc",
Expand Down
2 changes: 1 addition & 1 deletion include/rocksdb/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// minor or major version number planned for release.
#define ROCKSDB_MAJOR 7
#define ROCKSDB_MINOR 6
#define ROCKSDB_PATCH 1
#define ROCKSDB_PATCH 0

// Do not use these. We made the mistake of declaring macros starting with
// double underscore. Now we have to live with our choice. We'll deprecate these
Expand Down
1 change: 0 additions & 1 deletion src.mk
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ LIB_SOURCES = \
util/slice.cc \
util/file_checksum_helper.cc \
util/status.cc \
util/stderr_logger.cc \
util/string_util.cc \
util/thread_local.cc \
util/threadpool_imp.cc \
Expand Down
30 changes: 0 additions & 30 deletions util/stderr_logger.cc

This file was deleted.

23 changes: 18 additions & 5 deletions util/stderr_logger.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.
//
// Copyright (c) 2016-present, Facebook, Inc. All rights reserved.
// This source code is licensed under both the GPLv2 (found in the
// COPYING file in the root directory) and Apache 2.0 License
// (found in the LICENSE.Apache file in the root directory).
Expand All @@ -9,6 +8,7 @@
#include <stdarg.h>
#include <stdio.h>

#include "port/sys_time.h"
#include "rocksdb/env.h"

namespace ROCKSDB_NAMESPACE {
Expand All @@ -19,13 +19,26 @@ class StderrLogger : public Logger {
explicit StderrLogger(const InfoLogLevel log_level = InfoLogLevel::INFO_LEVEL)
: Logger(log_level) {}

~StderrLogger() override;

// Brings overloaded Logv()s into scope so they're not hidden when we override
// a subset of them.
using Logger::Logv;

virtual void Logv(const char* format, va_list ap) override;
virtual void Logv(const char* format, va_list ap) override {
const uint64_t thread_id = Env::Default()->GetThreadID();

port::TimeVal now_tv;
port::GetTimeOfDay(&now_tv, nullptr);
const time_t seconds = now_tv.tv_sec;
struct tm t;
port::LocalTimeR(&seconds, &t);
fprintf(stderr, "%04d/%02d/%02d-%02d:%02d:%02d.%06d %llx ",
t.tm_year + 1900, t.tm_mon + 1, t.tm_mday, t.tm_hour, t.tm_min,
t.tm_sec, static_cast<int>(now_tv.tv_usec),
static_cast<long long unsigned int>(thread_id));

vfprintf(stderr, format, ap);
fprintf(stderr, "\n");
}
};

} // namespace ROCKSDB_NAMESPACE

0 comments on commit 4ae5e25

Please sign in to comment.