-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FLASH-386] DeltaMerge DDL support #190
Conversation
70074b0
to
dbf2086
Compare
} | ||
} | ||
|
||
void DeltaMergeStore::flushCache(const Context & db_context) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@flowbehappy please take a look at here, should we acquire for a lock
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DeltaMergeStore::flushCache
does not need any lock. Because It does not update segments
structure. But Segment:: flushCache
do need a std::unique_lock lock(read_write_mutex)
to synchronize between read threads on the Segment objects.
/run-integration-tests |
/run-integration-tests |
* cast DataType while reading from PageStorage * add isLossyCast function * alter for StroageDeltaMerge, WIP * add Alter for StorageDeltaMerge * add Alter for StorageDeltaMerge * add TableInfo in StroageDeltaMerge * rename table for StorageDeltaMerge * fix bug: the TableInfo from TiDB * add comments for DeltaMerge flush && cache * more faster(?) way to cast mismatch datatype * support cast for numeric type null/not null * support for other data type just change null / not null * isLossyCast -> isSupportedDataTypeCast * isSupportedDataTypeCast add decimal detect * rename function * fix compile errors in gtests * small fix * fix broken tests * support new column with non-zero default value * remove unused code * fix compile error in CI * fix bug in table rename * small fix * minor fix * refine cast function in chunk * update DeltaMergeStore's segments within lock * [WIP]Add test cases for default value ddl. Still has bugs * fix bugs after rebasing to latest master * add some TODO marks * fix compile error in gtests && remove unused comments * fix broken gtests * flush cached chunks in delta instead of doing DeltaMerge when ddl-changes apply * use TypeIndex instead of typeid_cast * clean up data after tests * address comment
* cast DataType while reading from PageStorage * add isLossyCast function * alter for StroageDeltaMerge, WIP * add Alter for StorageDeltaMerge * add Alter for StorageDeltaMerge * add TableInfo in StroageDeltaMerge * rename table for StorageDeltaMerge * fix bug: the TableInfo from TiDB * add comments for DeltaMerge flush && cache * more faster(?) way to cast mismatch datatype * support cast for numeric type null/not null * support for other data type just change null / not null * isLossyCast -> isSupportedDataTypeCast * isSupportedDataTypeCast add decimal detect * rename function * fix compile errors in gtests * small fix * fix broken tests * support new column with non-zero default value * remove unused code * fix compile error in CI * fix bug in table rename * small fix * minor fix * refine cast function in chunk * update DeltaMergeStore's segments within lock * [WIP]Add test cases for default value ddl. Still has bugs * fix bugs after rebasing to latest master * add some TODO marks * fix compile error in gtests && remove unused comments * fix broken gtests * flush cached chunks in delta instead of doing DeltaMerge when ddl-changes apply * use TypeIndex instead of typeid_cast * clean up data after tests * address comment
* cast DataType while reading from PageStorage * add isLossyCast function * alter for StroageDeltaMerge, WIP * add Alter for StorageDeltaMerge * add Alter for StorageDeltaMerge * add TableInfo in StroageDeltaMerge * rename table for StorageDeltaMerge * fix bug: the TableInfo from TiDB * add comments for DeltaMerge flush && cache * more faster(?) way to cast mismatch datatype * support cast for numeric type null/not null * support for other data type just change null / not null * isLossyCast -> isSupportedDataTypeCast * isSupportedDataTypeCast add decimal detect * rename function * fix compile errors in gtests * small fix * fix broken tests * support new column with non-zero default value * remove unused code * fix compile error in CI * fix bug in table rename * small fix * minor fix * refine cast function in chunk * update DeltaMergeStore's segments within lock * [WIP]Add test cases for default value ddl. Still has bugs * fix bugs after rebasing to latest master * add some TODO marks * fix compile error in gtests && remove unused comments * fix broken gtests * flush cached chunks in delta instead of doing DeltaMerge when ddl-changes apply * use TypeIndex instead of typeid_cast * clean up data after tests * address comment
* cast DataType while reading from PageStorage * add isLossyCast function * alter for StroageDeltaMerge, WIP * add Alter for StorageDeltaMerge * add Alter for StorageDeltaMerge * add TableInfo in StroageDeltaMerge * rename table for StorageDeltaMerge * fix bug: the TableInfo from TiDB * add comments for DeltaMerge flush && cache * more faster(?) way to cast mismatch datatype * support cast for numeric type null/not null * support for other data type just change null / not null * isLossyCast -> isSupportedDataTypeCast * isSupportedDataTypeCast add decimal detect * rename function * fix compile errors in gtests * small fix * fix broken tests * support new column with non-zero default value * remove unused code * fix compile error in CI * fix bug in table rename * small fix * minor fix * refine cast function in chunk * update DeltaMergeStore's segments within lock * [WIP]Add test cases for default value ddl. Still has bugs * fix bugs after rebasing to latest master * add some TODO marks * fix compile error in gtests && remove unused comments * fix broken gtests * flush cached chunks in delta instead of doing DeltaMerge when ddl-changes apply * use TypeIndex instead of typeid_cast * clean up data after tests * address comment
* cast DataType while reading from PageStorage * add isLossyCast function * alter for StroageDeltaMerge, WIP * add Alter for StorageDeltaMerge * add Alter for StorageDeltaMerge * add TableInfo in StroageDeltaMerge * rename table for StorageDeltaMerge * fix bug: the TableInfo from TiDB * add comments for DeltaMerge flush && cache * more faster(?) way to cast mismatch datatype * support cast for numeric type null/not null * support for other data type just change null / not null * isLossyCast -> isSupportedDataTypeCast * isSupportedDataTypeCast add decimal detect * rename function * fix compile errors in gtests * small fix * fix broken tests * support new column with non-zero default value * remove unused code * fix compile error in CI * fix bug in table rename * small fix * minor fix * refine cast function in chunk * update DeltaMergeStore's segments within lock * [WIP]Add test cases for default value ddl. Still has bugs * fix bugs after rebasing to latest master * add some TODO marks * fix compile error in gtests && remove unused comments * fix broken gtests * flush cached chunks in delta instead of doing DeltaMerge when ddl-changes apply * use TypeIndex instead of typeid_cast * clean up data after tests * address comment
* cast DataType while reading from PageStorage * add isLossyCast function * alter for StroageDeltaMerge, WIP * add Alter for StorageDeltaMerge * add Alter for StorageDeltaMerge * add TableInfo in StroageDeltaMerge * rename table for StorageDeltaMerge * fix bug: the TableInfo from TiDB * add comments for DeltaMerge flush && cache * more faster(?) way to cast mismatch datatype * support cast for numeric type null/not null * support for other data type just change null / not null * isLossyCast -> isSupportedDataTypeCast * isSupportedDataTypeCast add decimal detect * rename function * fix compile errors in gtests * small fix * fix broken tests * support new column with non-zero default value * remove unused code * fix compile error in CI * fix bug in table rename * small fix * minor fix * refine cast function in chunk * update DeltaMergeStore's segments within lock * [WIP]Add test cases for default value ddl. Still has bugs * fix bugs after rebasing to latest master * add some TODO marks * fix compile error in gtests && remove unused comments * fix broken gtests * flush cached chunks in delta instead of doing DeltaMerge when ddl-changes apply * use TypeIndex instead of typeid_cast * clean up data after tests * address comment
* cast DataType while reading from PageStorage * add isLossyCast function * alter for StroageDeltaMerge, WIP * add Alter for StorageDeltaMerge * add Alter for StorageDeltaMerge * add TableInfo in StroageDeltaMerge * rename table for StorageDeltaMerge * fix bug: the TableInfo from TiDB * add comments for DeltaMerge flush && cache * more faster(?) way to cast mismatch datatype * support cast for numeric type null/not null * support for other data type just change null / not null * isLossyCast -> isSupportedDataTypeCast * isSupportedDataTypeCast add decimal detect * rename function * fix compile errors in gtests * small fix * fix broken tests * support new column with non-zero default value * remove unused code * fix compile error in CI * fix bug in table rename * small fix * minor fix * refine cast function in chunk * update DeltaMergeStore's segments within lock * [WIP]Add test cases for default value ddl. Still has bugs * fix bugs after rebasing to latest master * add some TODO marks * fix compile error in gtests && remove unused comments * fix broken gtests * flush cached chunks in delta instead of doing DeltaMerge when ddl-changes apply * use TypeIndex instead of typeid_cast * clean up data after tests * address comment
* cast DataType while reading from PageStorage * add isLossyCast function * alter for StroageDeltaMerge, WIP * add Alter for StorageDeltaMerge * add Alter for StorageDeltaMerge * add TableInfo in StroageDeltaMerge * rename table for StorageDeltaMerge * fix bug: the TableInfo from TiDB * add comments for DeltaMerge flush && cache * more faster(?) way to cast mismatch datatype * support cast for numeric type null/not null * support for other data type just change null / not null * isLossyCast -> isSupportedDataTypeCast * isSupportedDataTypeCast add decimal detect * rename function * fix compile errors in gtests * small fix * fix broken tests * support new column with non-zero default value * remove unused code * fix compile error in CI * fix bug in table rename * small fix * minor fix * refine cast function in chunk * update DeltaMergeStore's segments within lock * [WIP]Add test cases for default value ddl. Still has bugs * fix bugs after rebasing to latest master * add some TODO marks * fix compile error in gtests && remove unused comments * fix broken gtests * flush cached chunks in delta instead of doing DeltaMerge when ddl-changes apply * use TypeIndex instead of typeid_cast * clean up data after tests * address comment
* cast DataType while reading from PageStorage * add isLossyCast function * alter for StroageDeltaMerge, WIP * add Alter for StorageDeltaMerge * add Alter for StorageDeltaMerge * add TableInfo in StroageDeltaMerge * rename table for StorageDeltaMerge * fix bug: the TableInfo from TiDB * add comments for DeltaMerge flush && cache * more faster(?) way to cast mismatch datatype * support cast for numeric type null/not null * support for other data type just change null / not null * isLossyCast -> isSupportedDataTypeCast * isSupportedDataTypeCast add decimal detect * rename function * fix compile errors in gtests * small fix * fix broken tests * support new column with non-zero default value * remove unused code * fix compile error in CI * fix bug in table rename * small fix * minor fix * refine cast function in chunk * update DeltaMergeStore's segments within lock * [WIP]Add test cases for default value ddl. Still has bugs * fix bugs after rebasing to latest master * add some TODO marks * fix compile error in gtests && remove unused comments * fix broken gtests * flush cached chunks in delta instead of doing DeltaMerge when ddl-changes apply * use TypeIndex instead of typeid_cast * clean up data after tests * address comment
* cast DataType while reading from PageStorage * add isLossyCast function * alter for StroageDeltaMerge, WIP * add Alter for StorageDeltaMerge * add Alter for StorageDeltaMerge * add TableInfo in StroageDeltaMerge * rename table for StorageDeltaMerge * fix bug: the TableInfo from TiDB * add comments for DeltaMerge flush && cache * more faster(?) way to cast mismatch datatype * support cast for numeric type null/not null * support for other data type just change null / not null * isLossyCast -> isSupportedDataTypeCast * isSupportedDataTypeCast add decimal detect * rename function * fix compile errors in gtests * small fix * fix broken tests * support new column with non-zero default value * remove unused code * fix compile error in CI * fix bug in table rename * small fix * minor fix * refine cast function in chunk * update DeltaMergeStore's segments within lock * [WIP]Add test cases for default value ddl. Still has bugs * fix bugs after rebasing to latest master * add some TODO marks * fix compile error in gtests && remove unused comments * fix broken gtests * flush cached chunks in delta instead of doing DeltaMerge when ddl-changes apply * use TypeIndex instead of typeid_cast * clean up data after tests * address comment
* cast DataType while reading from PageStorage * add isLossyCast function * alter for StroageDeltaMerge, WIP * add Alter for StorageDeltaMerge * add Alter for StorageDeltaMerge * add TableInfo in StroageDeltaMerge * rename table for StorageDeltaMerge * fix bug: the TableInfo from TiDB * add comments for DeltaMerge flush && cache * more faster(?) way to cast mismatch datatype * support cast for numeric type null/not null * support for other data type just change null / not null * isLossyCast -> isSupportedDataTypeCast * isSupportedDataTypeCast add decimal detect * rename function * fix compile errors in gtests * small fix * fix broken tests * support new column with non-zero default value * remove unused code * fix compile error in CI * fix bug in table rename * small fix * minor fix * refine cast function in chunk * update DeltaMergeStore's segments within lock * [WIP]Add test cases for default value ddl. Still has bugs * fix bugs after rebasing to latest master * add some TODO marks * fix compile error in gtests && remove unused comments * fix broken gtests * flush cached chunks in delta instead of doing DeltaMerge when ddl-changes apply * use TypeIndex instead of typeid_cast * clean up data after tests * address comment
* cast DataType while reading from PageStorage * add isLossyCast function * alter for StroageDeltaMerge, WIP * add Alter for StorageDeltaMerge * add Alter for StorageDeltaMerge * add TableInfo in StroageDeltaMerge * rename table for StorageDeltaMerge * fix bug: the TableInfo from TiDB * add comments for DeltaMerge flush && cache * more faster(?) way to cast mismatch datatype * support cast for numeric type null/not null * support for other data type just change null / not null * isLossyCast -> isSupportedDataTypeCast * isSupportedDataTypeCast add decimal detect * rename function * fix compile errors in gtests * small fix * fix broken tests * support new column with non-zero default value * remove unused code * fix compile error in CI * fix bug in table rename * small fix * minor fix * refine cast function in chunk * update DeltaMergeStore's segments within lock * [WIP]Add test cases for default value ddl. Still has bugs * fix bugs after rebasing to latest master * add some TODO marks * fix compile error in gtests && remove unused comments * fix broken gtests * flush cached chunks in delta instead of doing DeltaMerge when ddl-changes apply * use TypeIndex instead of typeid_cast * clean up data after tests * address comment
* cast DataType while reading from PageStorage * add isLossyCast function * alter for StroageDeltaMerge, WIP * add Alter for StorageDeltaMerge * add Alter for StorageDeltaMerge * add TableInfo in StroageDeltaMerge * rename table for StorageDeltaMerge * fix bug: the TableInfo from TiDB * add comments for DeltaMerge flush && cache * more faster(?) way to cast mismatch datatype * support cast for numeric type null/not null * support for other data type just change null / not null * isLossyCast -> isSupportedDataTypeCast * isSupportedDataTypeCast add decimal detect * rename function * fix compile errors in gtests * small fix * fix broken tests * support new column with non-zero default value * remove unused code * fix compile error in CI * fix bug in table rename * small fix * minor fix * refine cast function in chunk * update DeltaMergeStore's segments within lock * [WIP]Add test cases for default value ddl. Still has bugs * fix bugs after rebasing to latest master * add some TODO marks * fix compile error in gtests && remove unused comments * fix broken gtests * flush cached chunks in delta instead of doing DeltaMerge when ddl-changes apply * use TypeIndex instead of typeid_cast * clean up data after tests * address comment
Signed-off-by: Wish <[email protected]>
Signed-off-by: Wish <[email protected]>
Design doc:
https://docs.google.com/document/d/1m2wqvr7QEsv7w4uRGlWzgX8IEb5nuV2iwH_sJSIP2qY/edit#
alter
on DM tables. Details are in the design docreadChunkData
now support read chunk column data ascolumn_defines
.If there are different between
column_defines
andchunk.columns
, it will do cast / fill missing values as needtests/delta_merge
TODO:
AlterCommand::validate
, will throw exception (FLASH-453)