summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgitbw95 <95719937+gitbw95@users.noreply.github.com>2022-08-30 11:36:10 -0700
committerGitHub <noreply@github.com>2022-08-30 11:36:10 -0700
commit1c6057ccd21b4696e7cd625c9c0745d21562bbc1 (patch)
tree4b8411b2513986a3bc0f5626d33381a9c2e2823a
parent35508f96df61c60f98421f874b8ad6b2a6cb54cd (diff)
parent4ae5e259e8d593bfb7b75ae95bfa99aa494646eb (diff)
Merge pull request #10609 from facebook/revert-10606-7.6.1v7.6.0
Revert "Patch 7.6.1"
-rw-r--r--CMakeLists.txt1
-rw-r--r--HISTORY.md4
-rw-r--r--TARGETS2
-rw-r--r--include/rocksdb/version.h2
-rw-r--r--src.mk1
-rw-r--r--util/stderr_logger.cc30
-rw-r--r--util/stderr_logger.h23
7 files changed, 19 insertions, 44 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c6ae7969b..bb65a9d8b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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
diff --git a/HISTORY.md b/HISTORY.md
index 382dd251c..114de4421 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -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.
diff --git a/TARGETS b/TARGETS
index 489d5c236..9f51dfa92 100644
--- a/TARGETS
+++ b/TARGETS
@@ -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",
@@ -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",
diff --git a/include/rocksdb/version.h b/include/rocksdb/version.h
index 15716edeb..41ea925f0 100644
--- a/include/rocksdb/version.h
+++ b/include/rocksdb/version.h
@@ -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
diff --git a/src.mk b/src.mk
index 9f670c346..c6dad4f00 100644
--- a/src.mk
+++ b/src.mk
@@ -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 \
diff --git a/util/stderr_logger.cc b/util/stderr_logger.cc
deleted file mode 100644
index 6044b8b93..000000000
--- a/util/stderr_logger.cc
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) Meta Platforms, Inc. and affiliates.
-//
-// 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).
-
-#include "util/stderr_logger.h"
-
-#include "port/sys_time.h"
-
-namespace ROCKSDB_NAMESPACE {
-StderrLogger::~StderrLogger() {}
-
-void StderrLogger::Logv(const char* format, va_list ap) {
- 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
diff --git a/util/stderr_logger.h b/util/stderr_logger.h
index c3b01210c..97bd62561 100644
--- a/util/stderr_logger.h
+++ b/util/stderr_logger.h
@@ -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).
@@ -9,6 +8,7 @@
#include <stdarg.h>
#include <stdio.h>
+#include "port/sys_time.h"
#include "rocksdb/env.h"
namespace ROCKSDB_NAMESPACE {
@@ -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