forked from percona/percona-server
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Report per column family metadata in SHOW ENGINE ROCKSDB STATUS
Summary: Report the currently available per column family statistics from rocksdb. Each column family is reported on a separate row. DB stats is on a separate row. The output is similar to the output from rocksdb's LOG file. Since column families aren't currently being cleaned up after a table is dropped, the show_engine test needs to force the mysql server to restart. Otherwise, SHOW ENGINE rocksdb STATUS can produce results for column families whose tables/indicies have been removed. @update-submodule: rocksdb Test Plan: mysqltest.sh Reviewers: maykov, yoshinorim, spetrunia, jonahcohen Reviewed By: jonahcohen Differential Revision: https://reviews.facebook.net/D32217
- Loading branch information
Showing
5 changed files
with
55 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
DROP TABLE IF EXISTS t1; | ||
DROP TABLE IF EXISTS t2; | ||
DROP TABLE IF EXISTS t3; | ||
DROP TABLE IF EXISTS t4; | ||
CREATE TABLE t1 (i INT, PRIMARY KEY (i) COMMENT 'cf_t1') ENGINE = ROCKSDB; | ||
CREATE TABLE t2 (j INT, PRIMARY KEY (j) COMMENT 'cf_t2') ENGINE = ROCKSDB; | ||
CREATE TABLE t3 (k INT, PRIMARY KEY (k) COMMENT 'cf_t1') ENGINE = ROCKSDB; | ||
CREATE TABLE t4 (l INT, PRIMARY KEY (l) COMMENT 'cf_t4') ENGINE = ROCKSDB; | ||
SHOW ENGINE rocksdb STATUS; | ||
Type Name Status | ||
DB db # | ||
COMPACTION cf_t1 # | ||
COMPACTION cf_t2 # | ||
COMPACTION cf_t4 # | ||
COMPACTION default # | ||
DROP TABLE t1; | ||
DROP TABLE t2; | ||
DROP TABLE t3; | ||
DROP TABLE t4; | ||
SHOW ENGINE rocksdb MUTEX; | ||
Type Name Status | ||
SHOW ENGINE ALL MUTEX; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
SHOW ENGINE rocksdb STATUS; | ||
Type Name Status | ||
ROCKSDB live_files # | ||
DB db # | ||
COMPACTION default # | ||
SHOW ENGINE rocksdb MUTEX; | ||
Type Name Status | ||
SHOW ENGINE ALL MUTEX; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--force-restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# | ||
# SHOW ENGINE STATUS command | ||
# Checking that the command doesn't produce an error. | ||
# If it starts producing an actual result, the result file | ||
# will need to be updated, and possibly masked. | ||
|
||
--disable_warnings | ||
DROP TABLE IF EXISTS t1; | ||
DROP TABLE IF EXISTS t2; | ||
DROP TABLE IF EXISTS t3; | ||
DROP TABLE IF EXISTS t4; | ||
--enable_warnings | ||
|
||
CREATE TABLE t1 (i INT, PRIMARY KEY (i) COMMENT 'cf_t1') ENGINE = ROCKSDB; | ||
CREATE TABLE t2 (j INT, PRIMARY KEY (j) COMMENT 'cf_t2') ENGINE = ROCKSDB; | ||
CREATE TABLE t3 (k INT, PRIMARY KEY (k) COMMENT 'cf_t1') ENGINE = ROCKSDB; | ||
CREATE TABLE t4 (l INT, PRIMARY KEY (l) COMMENT 'cf_t4') ENGINE = ROCKSDB; | ||
--replace_column 3 # | ||
SHOW ENGINE rocksdb STATUS; | ||
DROP TABLE t1; | ||
DROP TABLE t2; | ||
DROP TABLE t3; | ||
DROP TABLE t4; | ||
|
||
SHOW ENGINE rocksdb MUTEX; | ||
# For SHOW ALL MUTEX even the number of lines is volatile, so the result logging is disabled | ||
--disable_result_log | ||
SHOW ENGINE ALL MUTEX; | ||
--enable_result_log | ||
|