Bharat Nallan Chakravarthy
c9f35a8f84
review fixes
2023-12-14 11:28:49 -08:00
Bharat Nallan Chakravarthy
efbf39ea06
improve TableNameHints
2023-12-02 00:45:21 -08:00
Duc Canh Le
1fa6130072
small refactor
...
Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
2023-11-07 01:27:53 +00:00
Duc Canh Le
4c21ba7b6f
tables auto initialize new disks without restart
...
Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
2023-11-06 10:26:48 +00:00
flynn
6ec783a746
Refactor IHints
2023-09-10 03:48:12 +00:00
Alexander Tokmakov
331958041e
better synchronisation of RESTART REPLICA
2023-09-01 16:27:21 +02:00
Alexander Tokmakov
8dd3448844
Update DatabaseCatalog.h
2023-08-25 19:29:47 +03:00
kothiga
f33c585bc5
Addressing feedback.
2023-08-18 13:50:31 -07:00
Austin Kothig
6b42975d33
Change BE-UUID to work the same as LE-UUID. Included high and low getters to provide cleaner code when accessing undertype.
2023-08-18 08:19:46 -07:00
Yarik Briukhovetskyi
a6f89c0546
Added suggestions for mistyped names for db and tables with different… ( #49801 )
...
* Added suggestions for mistyped names for db and tables with different scenarios commented
* fixed bugs
* fixed style check
* fixed errors
* fixed errors
* fixed error with exceptions
* fixed exceptions
* fixed exceptions
* fixed exceptions
* added test and fixed bugs
* fixed style check
* fixed style check
* fixed style check
* fixed check black
* Update test.py
* Fixed server crash
* Fixed server crash and style check
* Fixed style check
* Fixed style check
* Fixed style check
* Fixed bugs with drop_db
* fixed fast test
* added tests
* fixed style check
* fixed style check
* fixed bug with lock_db
* fixed bug with lock_db and fixed reviews
* fixed bug with lock_db and fixed reviews
* fixed style check
* fixed fast test
* fixed fast test
* revert to fd582a2
* revert to fd582a2
* Removed unused parameters
Co-authored-by: Yakov Olkhovskiy <99031427+yakov-olkhovskiy@users.noreply.github.com>
* Remove unused parameters
Co-authored-by: Yakov Olkhovskiy <99031427+yakov-olkhovskiy@users.noreply.github.com>
* resolved arguments issue in assertDatabaseExists
* fixing fast test
* fixed fast test
* fixed stateless test for default db
* Update src/Interpreters/DatabaseCatalog.cpp
Co-authored-by: Yakov Olkhovskiy <99031427+yakov-olkhovskiy@users.noreply.github.com>
* Update src/Interpreters/DatabaseCatalog.cpp
Co-authored-by: Yakov Olkhovskiy <99031427+yakov-olkhovskiy@users.noreply.github.com>
* Update src/Interpreters/DatabaseCatalog.cpp
Co-authored-by: Yakov Olkhovskiy <99031427+yakov-olkhovskiy@users.noreply.github.com>
* Fixing tests.
* resolved problem with mutex
* Fixed mutex in assertDatabaseExists
* changes about assertDatabaseExists
* fixed bugs with file types
* fixed string types
* fixed fast test
* fixed mutex
* fixed mutex
* fixed style check
* Update src/Interpreters/DatabaseCatalog.cpp
Co-authored-by: Yakov Olkhovskiy <99031427+yakov-olkhovskiy@users.noreply.github.com>
* Update src/Interpreters/DatabaseCatalog.cpp
Co-authored-by: Yakov Olkhovskiy <99031427+yakov-olkhovskiy@users.noreply.github.com>
* Update src/Interpreters/DatabaseCatalog.cpp
Co-authored-by: Yakov Olkhovskiy <99031427+yakov-olkhovskiy@users.noreply.github.com>
* Update src/Interpreters/DatabaseCatalog.cpp
Co-authored-by: Yakov Olkhovskiy <99031427+yakov-olkhovskiy@users.noreply.github.com>
* Update src/Interpreters/DatabaseCatalog.cpp
Co-authored-by: Yakov Olkhovskiy <99031427+yakov-olkhovskiy@users.noreply.github.com>
* Update src/Interpreters/DatabaseCatalog.cpp
Co-authored-by: Yakov Olkhovskiy <99031427+yakov-olkhovskiy@users.noreply.github.com>
* fixed build
* added -unlocked versions of functions
* Revert "fixed build"
This reverts commit 8ce961be21
.
* Revert "fixed build"
This reverts commit 8ce961be21
.
* changed usage of assertDatabaseExistsUnlocked()
* fixed style check
* style check
* style check
* Revert "style check"
This reverts commit 28a9ee85a0
.
* Merge branch 'master' into hints-for-wrong-db-or-table-name
* Changed AssertDatabaseExists and unified exception output
* resolved proposed changes and modified tests
* Revert "resolved proposed changes and modified tests"
This reverts commit d45337d65c
.
* resolved requested changes
* fixed tests
* fixed tests
* fixed check black
* Update include brackets
Co-authored-by: Yakov Olkhovskiy <99031427+yakov-olkhovskiy@users.noreply.github.com>
* Update suggested changes
* Update suggested changes
* Fixed style check
* Added test to analyzer_integration_broken
* Update DatabaseCatalog.cpp
* Update test.py
* fixed test
* Revert "fixed test"
This reverts commit ca6d4c17c8
.
* fixed test
* Revert "fixed test"
This reverts commit fe6d0d9c86
, reversing
changes made to 22f4496704
.
* Update test.py
* fixed black check
* Update test.py
* fixed long_log_tinylog_deadlock_race
* Update DatabaseCatalog.cpp
* Update test.py
* style
* Update DatabaseCatalog.cpp
* Fixed test
* implemented for IDatabase
* Style check
* removed const_cast
* Update DatabaseCatalog.h
* Update DatabaseCatalog.h
* Update DatabaseCatalog.cpp
* Update DatabaseCatalog.cpp
* Added db name to hints
* Update 00002_log_and_exception_messages_formatting.sql
* Update 00002_log_and_exception_messages_formatting.sql
---------
Co-authored-by: Yakov Olkhovskiy <99031427+yakov-olkhovskiy@users.noreply.github.com>
2023-08-11 13:24:16 +03:00
Alexander Tokmakov
f53ff5d4f2
more fair queue for drop table sync ( #52276 )
2023-07-20 14:51:01 +03:00
Alexander Tokmakov
fc19e74ba9
fix deadlock on DatabaseCatalog shutdown
2023-07-07 01:12:17 +02:00
Nikolai Kochetov
7ebe19f5fb
Fixing more tests
2023-05-25 19:18:11 +00:00
xiedeyantu
9382c6ffdc
better
2023-03-27 23:51:35 +08:00
xiedeyantu
5036d19af3
better
2023-03-27 22:16:37 +08:00
xiedeyantu
5a18e0d5a5
support undrop table
2023-03-27 22:16:36 +08:00
chen
60b7ad819d
Add system.marked_dropped_tables ( #47364 )
...
* add system table marked_dropped_tables
* add test
* add test
* fix
* fix test
* fix style
* fix test
* Update 25400_marked_dropped_tables.sql
* Update 25400_marked_dropped_tables.sql
* Update 25400_marked_dropped_tables.sql
* Update 25400_marked_dropped_tables.sql
* Update 25400_marked_dropped_tables.sql
* fix
* fix test
* Update StorageSystemMarkedDroppedTables.cpp
* fix
* if table_mark_dropped.table is nullptr, engine set empty
2023-03-17 13:48:26 +03:00
Alexey Milovidov
656af55831
Merge pull request #46384 from ClickHouse/fixes_for_993
...
Fixes for 993
2023-02-26 01:55:20 +03:00
Alexander Tokmakov
3457b68dcc
fix
2023-02-17 17:57:49 +01:00
Alexander Tokmakov
9feb448a5e
fix a race condition
2023-02-16 14:41:18 +01:00
Alexander Tokmakov
e712fbecb2
fix race between drop and create
2023-02-14 00:45:28 +01:00
Vitaly Baranov
4869d3806c
Add setting check_referential_table_dependencies to check referential dependencies on DROP TABLE.
2023-02-08 23:56:59 +01:00
serxa
693489a8ad
review fixes
2023-01-12 15:51:04 +00:00
serxa
15bb127b01
replace every std::shared_mutex
with DB::FastSharedMutex
2023-01-06 23:35:38 +00:00
Vitaly Baranov
e1f7f04752
Referential dependencies for RESTORE ( #43834 )
...
* Rename DDLDependencyVisitor -> DDLLoadingDependencyVisitor.
* Move building a loading graph to TablesLoader.
* Implement referential dependencies for tables and use them
when restoring tables from a backup.
* Remove StorageID::operator < (because of its inconsistency with ==).
* Add new tests.
* Fix test.
* Fix memory leak.
Co-authored-by: Nikita Mikhaylov <mikhaylovnikitka@gmail.com>
2022-12-02 15:05:46 +01:00
Alexander Tokmakov
a1ff835894
fix
2022-10-07 19:52:34 +02:00
Alexander Tokmakov
d682c2ccdb
fix
2022-10-05 22:13:16 +02:00
Alexander Tokmakov
a269cf29e4
remove unused dirs from store on all disks
2022-08-03 19:49:16 +02:00
avogar
9291d33080
Pass const std::string_view & by value, not by reference
2022-07-14 16:11:57 +00:00
Vitaly Baranov
aa97bf5125
Improve handling predefined databases and tables.
2022-06-30 08:37:17 +02:00
Alexander Tokmakov
4f54abf67f
better names for macros
2022-06-28 16:27:18 +02:00
Alexander Tokmakov
f4883f1f7e
add some TSA aanotations
2022-06-27 22:48:27 +02:00
Alexander Tokmakov
ed8341025b
make code less bad
2022-06-22 18:31:42 +02:00
Alexander Tokmakov
dc1f596326
fix
2022-06-22 00:50:16 +02:00
Alexander Tokmakov
ba0fcec993
add background cleanup of store/ subdirs
2022-06-21 12:35:47 +02:00
Vitaly Baranov
0102626532
Disable the 'BACKUP ALL' command (it's not quite clear what to do with predefined databases).
2022-06-15 20:32:35 +02:00
Vitaly Baranov
1198e86295
Fix storing temporary tables and skipping system tables while making a backup.
2022-06-15 20:32:34 +02:00
Vitaly Baranov
592f568f83
Move backup/restore code to storages and databases - part 2.
2022-06-15 20:32:31 +02:00
Maksim Kita
e30117a3d6
Fix clang-tidy warnings in Interpreters, IO folders
2022-03-14 18:17:35 +00:00
Maksim Kita
1f5837359e
clang-tidy check performance-noexcept-move-constructor fix
2022-03-02 18:15:27 +00:00
Alexander Tokmakov
23e8cc24b5
fix tests
2021-11-03 18:06:19 +03:00
Alexander Tokmakov
c4108ab672
support alter
2021-11-02 17:30:22 +03:00
Alexander Tokmakov
598dbe04db
fix tests, support rename
2021-11-02 15:58:45 +03:00
Alexander Tokmakov
2b566c5bdf
basic check for dependencies on drop table
2021-11-01 22:20:18 +03:00
tavplubix
7742b96497
Remove metadata leftovers on drop database ( #30054 )
...
* remove metadata leftovers on drop database
* Update InterpreterDropQuery.cpp
* Update DatabaseCatalog.cpp
2021-10-13 13:34:18 +03:00
tavplubix
341a6c51d6
Merging #24866 ( #28691 )
...
* Add StorageSystemISTables.cpp/.h
* Another attempt
* Columns and Views
* Add information schema db and fix information schema 'tables' table
* fix build
* remove copy-paste, add views to system tables
* add test
* fix
* fix_tests
Co-authored-by: Damir Petrov <petrovdamir2235@gmail.com>
Co-authored-by: Damir Petrov <0442a403@verstehen.sas.yp-c.yandex.net>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-09-09 12:37:51 +03:00
kssenii
7bea8200d8
Revert "Merge pull request #28082 from zhongyuankai/add-system-of-table_views"
...
This reverts commit e5bcfba89e
, reversing
changes made to d77f243651
.
2021-09-06 19:20:33 +00:00
Azat Khuzhin
bf6ba796f8
Fix UUID overlap in DROP TABLE for internal DDL from MaterializeMySQL
...
This will fix race with DatabaseCatalog::loadMarkedAsDroppedTables(),
since MaterializeMySQL, and MaterializedMySQLSyncThread in background,
will be started earlier then
DatabaseCatalog::loadMarkedAsDroppedTables() and will move those tables
to metadata_dropped, and after loadMarkedAsDroppedTables() will start
and try to load partially dropped tables and will hit UUID overlap:
12:02:51.536783 [ 3026034 ] {} <Information> Application: starting up
12:02:53.019282 [ 3026034 ] {} <Information> DatabaseMaterializeMySQL<Atomic> (mysql): Total 9 tables and 0 dictionaries.
12:02:53.041699 [ 3026200 ] {} <Debug> mysql.data (7143b65f-6982-4600-b143-b65f6982e600): Loading data parts
12:02:53.041740 [ 3026200 ] {} <Debug> mysql.data (7143b65f-6982-4600-b143-b65f6982e600): There are no data parts
12:02:53.620382 [ 3026034 ] {} <Information> DatabaseMaterializeMySQL<Atomic> (mysql): Starting up tables.
12:03:00.669730 [ 3026183 ] {} <Debug> executeQuery: (internal) /*Materialize MySQL step 1: execute MySQL DDL for dump data*/ DROP TABLE mysql.data
12:03:00.741894 [ 3026269 ] {} <Information> DatabaseCatalog: Trying load partially dropped table mysql.data (7143b65f-6982-4600-b143-b65f6982e600) from /var/lib/clickhouse/metadata_dropped/mysql.data.7143b65f-6982-4600-b143-b65f6982e600.sql
12:03:00.742582 [ 3026269 ] {} <Debug> mysql.data (7143b65f-6982-4600-b143-b65f6982e600): Loading data parts
12:03:00.742650 [ 3026269 ] {} <Debug> mysql.data (7143b65f-6982-4600-b143-b65f6982e600): There are no data parts
12:03:00.773137 [ 3026034 ] {} <Error> Application: Caught exception while loading metadata: Code: 57, e.displayText() = DB::Exception: Mapping for table with UUID=7143b65f-6982-4600-b143-b65f6982e600 already exists. It happened due to UUID collision, most likely because some not random UUIDs were manually specified in CREATE queries., Stack trace (when copying this message, always include the lines below):
12:03:01.224557 [ 3026034 ] {} <Error> Application: DB::Exception: Mapping for table with UUID=7143b65f-6982-4600-b143-b65f6982e600 already exists. It happened due to UUID collision, most likely because some not random UUIDs were manually specified in CREATE queries.
Cc: @zhang2014
2021-09-04 10:41:28 +03:00
zhongyuankai
64efa917d8
review system.views
2021-08-25 18:11:40 +08:00
OnePiece
01f4e2e0e0
Update DatabaseCatalog.h
2021-08-24 20:03:49 +08:00