Closed kennytm closed 4 years ago
/merge
/run-all-tests
@kennytm merge failed.
[2020-04-30T11:28:53.945Z] Statement: #813 - SELECT SHA1( `col_smallint_key` ) AS field1, ENCODE( `col_bit_key`, `col_bit` ) AS field2 FROM `table1_int_autoinc` WHERE ! `col_float_key` ORDER BY field1, field2 LIMIT 4 /* QNO 815 CON_ID 152 */ ;
[2020-04-30T11:28:53.945Z] NoPushDown Output:
[2020-04-30T11:28:53.945Z] field1 field2
[2020-04-30T11:28:53.945Z]
[2020-04-30T11:28:53.945Z]
[2020-04-30T11:28:53.945Z] WithPushDown Output:
[2020-04-30T11:28:53.945Z] field1 field2
[2020-04-30T11:28:53.945Z] fcaf7c134f49c65f2c5765d81c181f3334cefe18
[2020-04-30T11:28:53.945Z]
[2020-04-30T11:28:53.945Z]
[2020-04-30T11:28:53.945Z]
[2020-04-30T11:28:53.945Z]
[2020-04-30T11:28:53.945Z] NoPushDown Plan:
[2020-04-30T11:28:53.945Z] id estRows task access object operator info
[2020-04-30T11:28:53.945Z] Projection_7 0.00 root sha1(cast(push_down_test_db.table1_int_autoinc.col_smallint_key, var_string(20)))->Column#62, encode(cast(push_down_test_db.table1_int_autoinc.col_bit_key, var_string(20)), cast(push_down_test_db.table1_int_autoinc.col_bit, var_string(20)))->Column#63
[2020-04-30T11:28:53.945Z] └─Projection_23 0.00 root push_down_test_db.table1_int_autoinc.col_smallint_key, push_down_test_db.table1_int_autoinc.col_bit, push_down_test_db.table1_int_autoinc.col_bit_key, push_down_test_db.table1_int_autoinc.col_float_key
[2020-04-30T11:28:53.945Z] └─TopN_8 0.00 root Column#66:asc, Column#67:asc, offset:0, count:4
[2020-04-30T11:28:53.945Z] └─Projection_24 0.00 root push_down_test_db.table1_int_autoinc.col_smallint_key, push_down_test_db.table1_int_autoinc.col_bit, push_down_test_db.table1_int_autoinc.col_bit_key, push_down_test_db.table1_int_autoinc.col_float_key, sha1(cast(push_down_test_db.table1_int_autoinc.col_smallint_key, var_string(20)))->Column#66, encode(cast(push_down_test_db.table1_int_autoinc.col_bit_key, var_string(20)), cast(push_down_test_db.table1_int_autoinc.col_bit, var_string(20)))->Column#67
[2020-04-30T11:28:53.945Z] └─TableReader_13 0.00 root data:Selection_12
[2020-04-30T11:28:53.945Z] └─Selection_12 0.00 cop[tikv] not(istrue(push_down_test_db.table1_int_autoinc.col_float_key))
[2020-04-30T11:28:53.945Z] └─TableFullScan_11 1.00 cop[tikv] table:table1_int_autoinc keep order:false, stats:pseudo
[2020-04-30T11:28:53.945Z]
[2020-04-30T11:28:53.945Z]
[2020-04-30T11:28:53.945Z] WithPushDown Plan:
[2020-04-30T11:28:53.945Z] id estRows task access object operator info
[2020-04-30T11:28:53.945Z] Projection_7 4.00 root sha1(cast(push_down_test_db.table1_int_autoinc.col_smallint_key, var_string(20)))->Column#62, encode(cast(push_down_test_db.table1_int_autoinc.col_bit_key, var_string(20)), cast(push_down_test_db.table1_int_autoinc.col_bit, var_string(20)))->Column#63
[2020-04-30T11:28:53.945Z] └─Projection_23 4.00 root push_down_test_db.table1_int_autoinc.col_smallint_key, push_down_test_db.table1_int_autoinc.col_bit, push_down_test_db.table1_int_autoinc.col_bit_key, push_down_test_db.table1_int_autoinc.col_float_key
[2020-04-30T11:28:53.945Z] └─TopN_9 4.00 root Column#66:asc, Column#67:asc, offset:0, count:4
[2020-04-30T11:28:53.945Z] └─Projection_24 20.00 root push_down_test_db.table1_int_autoinc.col_smallint_key, push_down_test_db.table1_int_autoinc.col_bit, push_down_test_db.table1_int_autoinc.col_bit_key, push_down_test_db.table1_int_autoinc.col_float_key, sha1(cast(push_down_test_db.table1_int_autoinc.col_smallint_key, var_string(20)))->Column#66, encode(cast(push_down_test_db.table1_int_autoinc.col_bit_key, var_string(20)), cast(push_down_test_db.table1_int_autoinc.col_bit, var_string(20)))->Column#67
[2020-04-30T11:28:53.945Z] └─IndexLookUp_16 20.00 root
[2020-04-30T11:28:53.945Z] ├─IndexRangeScan_14(Build) 20.00 cop[tikv] table:table1_int_autoinc, index:col_float_key(col_float_key) range:[NULL,NULL], [0,0], keep order:false, stats:pseudo
[2020-04-30T11:28:53.945Z] └─TableRowIDScan_15(Probe) 20.00 cop[tikv] table:table1_int_autoinc keep order:false, stats:pseudo
/merge
/run-all-tests
/run-cherry-picker
cherry pick to release-4.0 in PR #16960
What problem does this PR solve?
Support running BR inside TiDB directly.
What is changed and how it works?
Recognize the new
*ast.BRIEStmt
in pingcap/parser#746, and forward to the library functions in BR. When we executeTiDB will spawn a new BR manager which backs up the database
tpcc
into the provided storage. The query blocks until backup completes. Returns an empty set on success:and returns an error on failure:
BRIE tasks must be executed sequentially. Currently, for simplicity, tasks are queued in the local server only. In the future we make the entire cluster share the same queue.
Use SHOW BACKUP / SHOW RESTORE in another session to list the tasks
Use
KILL TIDB QUERY n
to cancel a task.Check List
Tests
a simple tableW=30 TPC-C database (2 GB), drop it, and run restore from the archive.Code changes
Side effects
Related changes
Release note
Added the RESTORE statement to restore from the backup archive.(don't include into release note yet, do so after the entire feature is complete.)