Skip to content

Commit

Permalink
Merge from merge-myrocks:
Browse files Browse the repository at this point in the history
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
  • Loading branch information
spetrunia committed Jan 27, 2018
2 parents 2da1917 + 445e518 commit e3a03da
Show file tree
Hide file tree
Showing 133 changed files with 5,564 additions and 1,222 deletions.
4 changes: 2 additions & 2 deletions storage/rocksdb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ IF(HAVE_SCHED_GETCPU)
ADD_DEFINITIONS(-DHAVE_SCHED_GETCPU=1)
ENDIF()

IF (NOT "$ENV{WITH_TBB}" STREQUAL "")
IF (WITH_TBB)
SET(rocksdb_static_libs ${rocksdb_static_libs}
$ENV{WITH_TBB}/libtbb${PIC_EXT}.a)
${WITH_TBB}/lib/libtbb${PIC_EXT}.a)
ADD_DEFINITIONS(-DTBB)
ENDIF()

Expand Down
4 changes: 3 additions & 1 deletion storage/rocksdb/build_rocksdb.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ set(ROCKSDB_SOURCES
table/block_based_table_factory.cc
table/block_based_table_reader.cc
table/block_builder.cc
table/block_fetcher.cc
table/block_prefix_index.cc
table/bloom_block.cc
table/cuckoo_table_builder.cc
Expand Down Expand Up @@ -340,15 +341,16 @@ set(ROCKSDB_SOURCES
utilities/transactions/optimistic_transaction_db_impl.cc
utilities/transactions/pessimistic_transaction.cc
utilities/transactions/pessimistic_transaction_db.cc
utilities/transactions/snapshot_checker.cc
utilities/transactions/transaction_base.cc
utilities/transactions/transaction_db_mutex_impl.cc
utilities/transactions/transaction_lock_mgr.cc
utilities/transactions/transaction_util.cc
utilities/transactions/write_prepared_txn.cc
utilities/transactions/write_prepared_txn_db.cc
utilities/ttl/db_ttl_impl.cc
utilities/write_batch_with_index/write_batch_with_index.cc
utilities/write_batch_with_index/write_batch_with_index_internal.cc

)

if(WIN32)
Expand Down
10 changes: 10 additions & 0 deletions storage/rocksdb/event_listener.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,14 @@ void Rdb_event_listener::OnExternalFileIngested(
DBUG_ASSERT(db != nullptr);
update_index_stats(info.table_properties);
}

void Rdb_event_listener::OnBackgroundError(
rocksdb::BackgroundErrorReason reason, rocksdb::Status *status) {
rdb_log_status_error(*status, "Error detected in background");
sql_print_error("RocksDB: BackgroundErrorReason: %d", (int)reason);
if (status->IsCorruption()) {
rdb_persist_corruption_marker();
abort();
}
}
} // namespace myrocks
3 changes: 3 additions & 0 deletions storage/rocksdb/event_listener.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ class Rdb_event_listener : public rocksdb::EventListener {
rocksdb::DB *db,
const rocksdb::ExternalFileIngestionInfo &ingestion_info) override;

void OnBackgroundError(rocksdb::BackgroundErrorReason reason,
rocksdb::Status *status) override;

private:
Rdb_ddl_manager *m_ddl_manager;

Expand Down
Loading

0 comments on commit e3a03da

Please sign in to comment.