-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refine schema sync on read logic and add test (#120)
* Add sync schema on read * Simplify schema syncer interface and adjust mock stuff * Rename default schema version setting * Compensate last commit * Remove curl library * Remove curl from builder image * Remove useless codes, init schema syncer based on pd config * Minor fix to schema debug * Fix alter tmt and pass tests * Fix build fail * Add lock for mock schema syncer * Fix schema sync service init context * Adjust schema tests * Not sync if no schema change detected * Adjust txn mock tests * Fix default value bug * Rename some tests * Remove sync schema test * Remove a lot useless code * Refine schema sync on read, and add drop on read test
- Loading branch information
1 parent
1a6a1c4
commit 33fb39d
Showing
5 changed files
with
92 additions
and
44 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
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
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
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
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,26 @@ | ||
=> DBGInvoke __enable_schema_sync_service('false') | ||
|
||
=> DBGInvoke __drop_tidb_table(default, test) | ||
=> drop table if exists default.test | ||
|
||
=> DBGInvoke __set_flush_threshold(1000000, 1000000) | ||
=> DBGInvoke __mock_schema_syncer('true') | ||
|
||
=> DBGInvoke __mock_tidb_table(default, test, 'col_1 String') | ||
=> DBGInvoke __refresh_schemas() | ||
=> DBGInvoke __put_region(4, 0, 100, default, test) | ||
=> DBGInvoke __drop_tidb_table(default, test, 'false') | ||
=> select * from default.test | ||
=> select * from default.test " --schema_version "100 | ||
Received exception from server (version {#WORD}): | ||
Code: 60. DB::Exception: Received from {#WORD} DB::Exception: Table default.test doesn't exist.. | ||
|
||
=> DBGInvoke __mock_tidb_table(default, test, 'col_1 String, col_2 Nullable(Int8)') | ||
=> select * from default.test | ||
Received exception from server (version {#WORD}): | ||
Code: 60. DB::Exception: Received from {#WORD} DB::Exception: Table default.test doesn't exist.. | ||
=> select * from default.test " --schema_version "100 | ||
|
||
=> DBGInvoke __drop_tidb_table(default, test) | ||
=> drop table if exists default.test | ||
=> DBGInvoke __enable_schema_sync_service('true') |