Skip to content

Commit e3a03da

Browse files
committed
Merge from merge-myrocks:
commit 445e518 Author: Sergei Petrunia <psergey@askmonty.org> Date: Sat Jan 27 10:18:20 2018 +0000 Copy of commit f8f364b47f2784f16b401f27658f1c16eaf348ec Author: Jay Edgar <jkedgar@fb.com> Date: Tue Oct 17 15:19:31 2017 -0700 Add a hashed, hierarchical, wheel timer implementation Summary: In order to implement idle timeouts on detached sessions we need something inside MySQL that is lightweight and can handle calling events in the future wi By default the timers are grouped into 10ms buckets (the 'hashed' part), though the size of the buckets is configurable at the creation of the timer. Eac Reviewed By: djwatson Differential Revision: D6199806 fbshipit-source-id: 5e1590f
2 parents 2da1917 + 445e518 commit e3a03da

File tree

133 files changed

+5564
-1222
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+5564
-1222
lines changed

storage/rocksdb/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ IF(HAVE_SCHED_GETCPU)
178178
ADD_DEFINITIONS(-DHAVE_SCHED_GETCPU=1)
179179
ENDIF()
180180

181-
IF (NOT "$ENV{WITH_TBB}" STREQUAL "")
181+
IF (WITH_TBB)
182182
SET(rocksdb_static_libs ${rocksdb_static_libs}
183-
$ENV{WITH_TBB}/libtbb${PIC_EXT}.a)
183+
${WITH_TBB}/lib/libtbb${PIC_EXT}.a)
184184
ADD_DEFINITIONS(-DTBB)
185185
ENDIF()
186186

storage/rocksdb/build_rocksdb.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ set(ROCKSDB_SOURCES
245245
table/block_based_table_factory.cc
246246
table/block_based_table_reader.cc
247247
table/block_builder.cc
248+
table/block_fetcher.cc
248249
table/block_prefix_index.cc
249250
table/bloom_block.cc
250251
table/cuckoo_table_builder.cc
@@ -340,15 +341,16 @@ set(ROCKSDB_SOURCES
340341
utilities/transactions/optimistic_transaction_db_impl.cc
341342
utilities/transactions/pessimistic_transaction.cc
342343
utilities/transactions/pessimistic_transaction_db.cc
344+
utilities/transactions/snapshot_checker.cc
343345
utilities/transactions/transaction_base.cc
344346
utilities/transactions/transaction_db_mutex_impl.cc
345347
utilities/transactions/transaction_lock_mgr.cc
346348
utilities/transactions/transaction_util.cc
347349
utilities/transactions/write_prepared_txn.cc
350+
utilities/transactions/write_prepared_txn_db.cc
348351
utilities/ttl/db_ttl_impl.cc
349352
utilities/write_batch_with_index/write_batch_with_index.cc
350353
utilities/write_batch_with_index/write_batch_with_index_internal.cc
351-
352354
)
353355

354356
if(WIN32)

storage/rocksdb/event_listener.cc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,14 @@ void Rdb_event_listener::OnExternalFileIngested(
8383
DBUG_ASSERT(db != nullptr);
8484
update_index_stats(info.table_properties);
8585
}
86+
87+
void Rdb_event_listener::OnBackgroundError(
88+
rocksdb::BackgroundErrorReason reason, rocksdb::Status *status) {
89+
rdb_log_status_error(*status, "Error detected in background");
90+
sql_print_error("RocksDB: BackgroundErrorReason: %d", (int)reason);
91+
if (status->IsCorruption()) {
92+
rdb_persist_corruption_marker();
93+
abort();
94+
}
95+
}
8696
} // namespace myrocks

storage/rocksdb/event_listener.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ class Rdb_event_listener : public rocksdb::EventListener {
3737
rocksdb::DB *db,
3838
const rocksdb::ExternalFileIngestionInfo &ingestion_info) override;
3939

40+
void OnBackgroundError(rocksdb::BackgroundErrorReason reason,
41+
rocksdb::Status *status) override;
42+
4043
private:
4144
Rdb_ddl_manager *m_ddl_manager;
4245

0 commit comments

Comments
 (0)