Commit Graph

196 Commits

Author SHA1 Message Date
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
Roman Vasin
95a7e11a47 Merge branch 'master' of github.com:ClickHouse/ClickHouse into ADQM-639 2023-03-06 09:11:20 +00:00
Alexey Milovidov
656af55831
Merge pull request #46384 from ClickHouse/fixes_for_993
Fixes for 993
2023-02-26 01:55:20 +03:00
Roman Vasin
5c1c5199b9
Merge branch 'master' into ADQM-639 2023-02-22 09:25:17 +03:00
Alexander Tokmakov
53b6fd79fb
Update DatabaseCatalog.cpp 2023-02-17 21:18:49 +03:00
Alexander Tokmakov
3457b68dcc fix 2023-02-17 17:57:49 +01:00
Roman Vasin
fde8e7e858 Add try/catch in TemporaryTableHolder destructor 2023-02-17 07:47:23 +00:00
Alexander Tokmakov
9feb448a5e fix a race condition 2023-02-16 14:41:18 +01:00
Roman Vasin
f410834bfb Remove dropTable of temp table from InterpreterDropQuery. 2023-02-14 17:03:36 +00:00
Roman Vasin
b0ced21c30 Move temp database clean up into new function removeDataPath() 2023-02-14 13:22:15 +00:00
Alexander Tokmakov
e712fbecb2 fix race between drop and create 2023-02-14 00:45:28 +01:00
Roman Vasin
bb465ce7dd
Merge branch 'master' into ADQM-639 2023-02-10 17:04:14 +03: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
Roman Vasin
9488bd834f
Merge branch 'master' into ADQM-639 2023-02-07 09:45:10 +03:00
Roman Vasin
c09d8e744f Make MergeTree and Log table engines DROP and clean data 2023-01-26 14:15:09 +00:00
Alexander Tokmakov
6eb557b2ba Merge branch 'master' into exception_message_patterns4 2023-01-25 13:49:17 +01:00
Sergei Trifonov
0d1ea05ff6
Merge pull request #45007 from ClickHouse/cancellable-mutex-integration
Fast shared mutex integration
2023-01-25 11:15:46 +01:00
Roman Vasin
aa0f01a409 Fix bug with DROP TEMPORARY TABLE for MergeTree 2023-01-24 06:54:19 +00:00
Alexander Tokmakov
3f6594f4c6 forbid old ctor of Exception 2023-01-23 22:18:05 +01:00
Alexander Tokmakov
70d1adfe4b
Better formatting for exception messages (#45449)
* save format string for NetException

* format exceptions

* format exceptions 2

* format exceptions 3

* format exceptions 4

* format exceptions 5

* format exceptions 6

* fix

* format exceptions 7

* format exceptions 8

* Update MergeTreeIndexGin.cpp

* Update AggregateFunctionMap.cpp

* Update AggregateFunctionMap.cpp

* fix
2023-01-24 00:13:58 +03:00
Sergei Trifonov
0fbfa17863
Merge branch 'master' into cancellable-mutex-integration 2023-01-23 12:44:09 +01:00
Roman Vasin
fa64203225 Add correct data path for temporary tables; Clean temp DB dir on server startup 2023-01-20 16:11:37 +00:00
Roman Vasin
8453c9d27d Add construction of temporary tables by StorageFactory 2023-01-20 07:47:08 +00:00
Roman Vasin
9fa4502b78 Add new constructor for TemporaryTableHolder 2023-01-19 07:12:29 +00:00
Alexander Tokmakov
72e8615bec formatting of some exception messages 2023-01-17 20:03:56 +01:00
Alexander Tokmakov
522686f78b less empty patterns 2023-01-17 01:19:44 +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
Alexander Tokmakov
ec09a66fbb fix flaky test (I'm too lazy to create separate PR for this) 2022-12-13 21:49:32 +01: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
46d1c92ba2
Update DatabaseCatalog.cpp 2022-11-30 17:48:52 +03:00
Alexander Tokmakov
40d28e3489 fix flaky test 2022-11-28 18:31:22 +01:00
Azat Khuzhin
e7d6b9ccca Avoid possible DROP hung due to attached web disk
While dropping the table server scans all disk for existence of data to
remove, but in case of unavailable web disk it will fail, and also not
instantly but after 10 retries (by default, after #42800), that can take
~30 seconds.

But scanning read only disks does not makes any sense, so reorder
conditions to avoid this.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-11-22 14:44:56 +01:00
Azat Khuzhin
4e76629aaf Fixes for -Wshorten-64-to-32
- lots of static_cast
- add safe_cast
- types adjustments
  - config
  - IStorage::read/watch
  - ...
- some TODO's (to convert types in future)

P.S. That was quite a journey...

v2: fixes after rebase
v3: fix conflicts after #42308 merged
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:19 +02:00
Alexander Tokmakov
4b371bd20c fix 2022-10-10 16:38:35 +02:00
Alexander Tokmakov
fa1134f299 Merge branch 'master' into fix_loading_dependencies 2022-10-10 16:30:52 +02:00
Alexey Milovidov
9bf5fe728b
Merge pull request #42173 from ClickHouse/remove-temporary-live-view
Remove TEMPORARY LIVE VIEW
2022-10-08 19:05:33 +03:00
Alexey Milovidov
b9159db82f Remove temporary live views 2022-10-08 00:16:36 +02:00
Alexander Tokmakov
a1ff835894 fix 2022-10-07 19:52:34 +02:00
Alexander Tokmakov
014784a9ca Merge branch 'master' into fix_loading_dependencies 2022-10-07 18:58:11 +02:00
Alexander Tokmakov
d682c2ccdb fix 2022-10-05 22:13:16 +02:00
Robert Schulze
fd86829824
Consolidate config_core.h into config.h
Less duplication, less confusion ...
2022-09-28 13:31:57 +00:00
Alexey Milovidov
ebe7d2d25e Fix stack overflow on recursive Buffer tables and system.tables 2022-08-25 21:26:32 +02:00
kssenii
0dda03c94b Fix checks 2022-08-10 00:06:58 +02:00
Alexander Tokmakov
6a5171c829
Update DatabaseCatalog.cpp 2022-08-04 17:10:13 +03:00
Alexander Tokmakov
a269cf29e4 remove unused dirs from store on all disks 2022-08-03 19:49:16 +02:00
Alexander Tokmakov
5ef7f5f494
Merge pull request #39229 from azat/fix-noexcept-scope
[RFC] Fix NOEXCEPT_SCOPE (before it calls std::terminate and looses the exception)
2022-07-15 18:14:56 +03:00
avogar
9291d33080 Pass const std::string_view & by value, not by reference 2022-07-14 16:11:57 +00:00
Azat Khuzhin
b20407fab9 Fix NOEXCEPT_SCOPE (before it calls std::terminate and looses the exception)
Current implementation of NOEXCEPT_SCOPE will not work, you cannot
rethrow exception outside the catch block, this will simply terminate
(via std::terminate) the program.
In other words NOEXCEPT_SCOPE macro will simply call std::terminate on
exception and will lost original exception.

But if NOEXCEPT_SCOPE will accept the code that should be runned w/o
exceptions, then it can catch exception and log it, rewrite it in this
way.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-14 17:16:18 +03:00
Vitaly Baranov
e367d96964 Fix style. 2022-06-30 15:10:33 +02:00