Skip to content

Commit 1c6057c

Browse files
authored
Merge pull request #10609 from facebook/revert-10606-7.6.1
Revert "Patch 7.6.1"
2 parents 35508f9 + 4ae5e25 commit 1c6057c

File tree

7 files changed

+19
-44
lines changed

7 files changed

+19
-44
lines changed

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,6 @@ set(SOURCES
827827
util/slice.cc
828828
util/file_checksum_helper.cc
829829
util/status.cc
830-
util/stderr_logger.cc
831830
util/string_util.cc
832831
util/thread_local.cc
833832
util/threadpool_imp.cc

HISTORY.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
# Rocksdb Change Log
2-
## 7.6.1 (08/29/2022)
3-
### Bug Fixes
4-
* Fix a bug where `port/sys_time.h` cannot be imported for some build when it is included in `stderr_logger.h`.
5-
62
## 7.6.0 (08/19/2022)
73
### New Features
84
* 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.

TARGETS

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ cpp_library_wrapper(name="rocksdb_lib", srcs=[
252252
"util/ribbon_config.cc",
253253
"util/slice.cc",
254254
"util/status.cc",
255-
"util/stderr_logger.cc",
256255
"util/string_util.cc",
257256
"util/thread_local.cc",
258257
"util/threadpool_imp.cc",
@@ -590,7 +589,6 @@ cpp_library_wrapper(name="rocksdb_whole_archive_lib", srcs=[
590589
"util/ribbon_config.cc",
591590
"util/slice.cc",
592591
"util/status.cc",
593-
"util/stderr_logger.cc",
594592
"util/string_util.cc",
595593
"util/thread_local.cc",
596594
"util/threadpool_imp.cc",

include/rocksdb/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// minor or major version number planned for release.
1414
#define ROCKSDB_MAJOR 7
1515
#define ROCKSDB_MINOR 6
16-
#define ROCKSDB_PATCH 1
16+
#define ROCKSDB_PATCH 0
1717

1818
// Do not use these. We made the mistake of declaring macros starting with
1919
// double underscore. Now we have to live with our choice. We'll deprecate these

src.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@ LIB_SOURCES = \
239239
util/slice.cc \
240240
util/file_checksum_helper.cc \
241241
util/status.cc \
242-
util/stderr_logger.cc \
243242
util/string_util.cc \
244243
util/thread_local.cc \
245244
util/threadpool_imp.cc \

util/stderr_logger.cc

Lines changed: 0 additions & 30 deletions
This file was deleted.

util/stderr_logger.h

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// Copyright (c) Meta Platforms, Inc. and affiliates.
2-
//
1+
// Copyright (c) 2016-present, Facebook, Inc. All rights reserved.
32
// This source code is licensed under both the GPLv2 (found in the
43
// COPYING file in the root directory) and Apache 2.0 License
54
// (found in the LICENSE.Apache file in the root directory).
@@ -9,6 +8,7 @@
98
#include <stdarg.h>
109
#include <stdio.h>
1110

11+
#include "port/sys_time.h"
1212
#include "rocksdb/env.h"
1313

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

22-
~StderrLogger() override;
23-
2422
// Brings overloaded Logv()s into scope so they're not hidden when we override
2523
// a subset of them.
2624
using Logger::Logv;
2725

28-
virtual void Logv(const char* format, va_list ap) override;
26+
virtual void Logv(const char* format, va_list ap) override {
27+
const uint64_t thread_id = Env::Default()->GetThreadID();
28+
29+
port::TimeVal now_tv;
30+
port::GetTimeOfDay(&now_tv, nullptr);
31+
const time_t seconds = now_tv.tv_sec;
32+
struct tm t;
33+
port::LocalTimeR(&seconds, &t);
34+
fprintf(stderr, "%04d/%02d/%02d-%02d:%02d:%02d.%06d %llx ",
35+
t.tm_year + 1900, t.tm_mon + 1, t.tm_mday, t.tm_hour, t.tm_min,
36+
t.tm_sec, static_cast<int>(now_tv.tv_usec),
37+
static_cast<long long unsigned int>(thread_id));
38+
39+
vfprintf(stderr, format, ap);
40+
fprintf(stderr, "\n");
41+
}
2942
};
3043

3144
} // namespace ROCKSDB_NAMESPACE

0 commit comments

Comments
 (0)