[Commits] 90c4f22ad13: Update RocksDB submodule to a version that includes Range Locking code
revision-id: 90c4f22ad136cfb17dcdf6d6f78e8b5b3fc3c6f5 () parent(s): bc468ab5dac998894e041b60ad3f3c70e2100c7c author: Sergei Petrunia committer: Sergei Petrunia timestamp: 2021-03-22 22:47:31 +0300 message: Update RocksDB submodule to a version that includes Range Locking code * fb-mysql-8.0.20 is based on RocksDB 6.16.3 * Update RocksDB to a 6.19-based branch with fix for RocksDB PR#7938 This requires making updates to non-range-locking code: - rocksdb::StopWatchNano ctor now has different signature - storage_/rocksdb/get_rocksdb_files.sh should use a different way to create rocksdb/util/build_version.cc file. (note: not sure this part is fully done) --- rocksdb | 2 +- storage/rocksdb/get_rocksdb_files.sh | 11 +++++------ storage/rocksdb/ha_rocksdb.cc | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/rocksdb b/rocksdb index e32a64aa547..c9878baa872 160000 --- a/rocksdb +++ b/rocksdb @@ -1 +1 @@ -Subproject commit e32a64aa547ad7f17af74648147e521acbc21d3f +Subproject commit c9878baa872a1841a993680b1787337e0c93b52a diff --git a/storage/rocksdb/get_rocksdb_files.sh b/storage/rocksdb/get_rocksdb_files.sh index 121d664a086..550c6682f0c 100755 --- a/storage/rocksdb/get_rocksdb_files.sh +++ b/storage/rocksdb/get_rocksdb_files.sh @@ -16,12 +16,11 @@ rm $MKFILE bv=rocksdb/util/build_version.cc date=$(date +%F) git_sha=$(pushd rocksdb >/dev/null && git rev-parse HEAD 2>/dev/null && popd >/dev/null) +git_mod=$(pushd rocksdb >/dev/null && git diff-index HEAD --quiet && echo $? && popd >/dev/null) + if [ ! -f $bv ] || [ -z $git_sha ] || [ ! `grep $git_sha $bv` ] then -echo "#include \"build_version.h\" -const char* rocksdb_build_git_sha = -\"rocksdb_build_git_sha:$git_sha\"; -const char* rocksdb_build_git_date = -\"rocksdb_build_git_date:$date\"; -const char* rocksdb_build_compile_date = __DATE__;" > $bv +sed -e "s/@GIT_SHA@/$git_sha/" \ + -e "s/@GIT_DATE@/$date/" \ + -e "s/@GIT_MOD@/$git_mod/" < $bv.in > $bv fi diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc index c4df0ae6c17..fdd3b0e08e1 100644 --- a/storage/rocksdb/ha_rocksdb.cc +++ b/storage/rocksdb/ha_rocksdb.cc @@ -4675,7 +4675,7 @@ static xa_status_code rocksdb_commit_by_xid( DBUG_ASSERT(xid != nullptr); DBUG_ASSERT(commit_latency_stats != nullptr); - rocksdb::StopWatchNano timer(rocksdb::Env::Default(), true); + rocksdb::StopWatchNano timer(rocksdb::SystemClock::Default(), true); const auto name = rdb_xid_to_string(*xid); DBUG_ASSERT(!name.empty()); @@ -4865,7 +4865,7 @@ static int rocksdb_commit(handlerton *const hton MY_ATTRIBUTE((__unused__)), DBUG_ASSERT(thd != nullptr); DBUG_ASSERT(commit_latency_stats != nullptr); - rocksdb::StopWatchNano timer(rocksdb::Env::Default(), true); + rocksdb::StopWatchNano timer(rocksdb::SystemClock::Default(), true); /* note: h->external_lock(F_UNLCK) is called after this function is called) */ Rdb_transaction *tx = get_tx_from_thd(thd);
participants (1)
-
psergey