Commit Graph

159 Commits

Author SHA1 Message Date
vdimir
c1ae369919
wip CHECK query for all tables 2023-10-27 15:22:10 +00:00
vdimir
7583394c9c
Support CHECK TABLE ... PART ... query 2023-10-23 12:33:35 +00:00
vdimir
8f0d7954ff
IStorage::checkDataNext returns optional 2023-10-23 10:12:30 +00:00
vdimir
fe95c0d0e4
Improve CHECK TABLE system query
Resubmit PR #52745
2023-10-23 09:35:26 +00:00
SmitaRKulkarni
d8adf05de2
Added a new column _block_number (#47532)
Added a new virtual column _block_number which is persisted on merges when allow_experimental_block_number_column is enabled
2023-09-20 11:31:12 +02:00
Bhavna Jindal
dc99de3c44 Log engine Mark file to read and write in little Endian for s390x compatibility 2023-09-15 08:59:40 -07:00
Robert Schulze
3472a928d8
Cosmetics: Rename dropCache() to clearCaches()
"dropCache()" is a bad name, it sounds like that the cache can no longer
be used after the call. Not true, we only "clear" the cache.
2023-08-14 15:42:32 +00:00
Alexander Tokmakov
4b30900fed
Revert "Improve CHECK TABLE system query" 2023-08-10 14:44:16 +03:00
vdimir
358ef26385
small fixes for CHECK TABLE 2023-08-08 09:45:33 +00:00
vdimir
1aedc4e892
Build proper pipeline for CHECK TABLE 2023-08-08 09:45:32 +00:00
vdimir
a882ef295f
Query CHECK TABLE takes care about progress and cancellation 2023-08-08 09:45:31 +00:00
Vitaly Baranov
e127d27453 Disable using fs cache for backup/restore #2. 2023-08-03 13:52:35 +02:00
Azat Khuzhin
d40dbdee62 Fix usage of temporary directories during RESTORE
Previously during RESTORE you may get the following warning in logs:

    <Warning> TemporaryFileOnDisk: Temporary path 'tmp/21672kaaaaa' does not exist in './disks/s3_common_disk/'

The reason is that it uses not disks/s3_common_disk/tmp but instead
disks/s3_common_disk/disks/s3_common_disk/tmp path.

Fix this by adding TemporaryFileOnDisk::getRelativePath() and use it
when appropriate.

And now - `find disks`, does not shows any more temporary leftovers.

v2: rename getPath to getAbsolutePath
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-07-27 19:24:54 +02:00
flynn
ad74189bc2
Fix Log family table return wrong rows count after truncate (#50585)
* Fix Log family table return wrong rows count after truncate

* fix test

* update test

* update test
2023-06-09 14:32:45 +03:00
Antonio Andelic
b11f744252
Correctly disable async insert with deduplication when it's not needed (#50663)
* Correctly disable async insert when it's not used

* Better

* Add comment

* Better

* Fix tests

---------

Co-authored-by: Nikita Mikhaylov <mikhaylovnikitka@gmail.com>
2023-06-07 20:33:08 +02:00
Sema Checherinda
13dcb62ffb fix logs engins 2023-05-30 12:26:20 +02:00
Vitaly Baranov
943707963f Add backup setting "decrypt_files_from_encrypted_disks" 2023-05-16 14:27:27 +02:00
Vitaly Baranov
5198997fd8 Remove ReadSettings from backup entries. 2023-05-16 14:27:27 +02:00
Vitaly Baranov
c92219f01b BACKUP now writes encrypted data for tables on encrypted disks. 2023-05-16 14:26:33 +02:00
Vitaly Baranov
cc50fcc60a Remove the 'temporary_file_' argument from BackupEntryFromImmutableFile's constructor. 2023-05-16 14:25:37 +02:00
Azat Khuzhin
218b1f9c29 Add ability to throttle BACKUPs on per-server/backup basis
Server settings:
- backup_read_bandwidth_for_server
- backup_write_bandwidth_for_server

Query settings:
- backup_read_bandwidth
- backup_write_bandwidth

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-04-05 09:39:48 +02:00
Vitaly Baranov
1cf1ce07fe Use server-side copy during restore from S3 to S3. 2023-03-13 23:50:13 +01:00
Alexander Tokmakov
fe92fd8a61 Merge branch 'master' into fix_insert_cancellation_in_native_protocol 2023-02-23 22:35:31 +01:00
Alexander Tokmakov
e660c0838c fix multipart requests 2023-02-22 17:54:35 +01:00
Alexander Tokmakov
592af6d652 fix incomplete interst through http 2023-02-22 02:34:03 +01:00
Alexey Milovidov
d8cda3dbb8 Remove PVS-Studio 2023-02-19 23:30:05 +01:00
flynn
a10f020b2d Storage Log faminy support settings storage policy 2023-02-04 14:28:31 +00: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
Vitaly Baranov
517e84cfb9 Finalize buffers after writing. 2022-12-09 03:02:45 +01:00
Anton Popov
2ae3cfa9e0
Merge branch 'master' into dynamic-columns-14 2022-10-31 16:15:19 +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
Anton Popov
86b29b7f1a fix serilization of Object inside other types 2022-09-08 15:16:39 +00:00
Alexander Tokmakov
f2c4cad255 add flag that enables automatic canversion from Ordinary to Atomic 2022-08-05 21:41:25 +02:00
Anton Popov
089009c996 fix reading from StorageLog with mmap 2022-07-13 20:36:18 +00:00
Vitaly Baranov
1dba3d9f9c Make temporary files in better places. 2022-07-04 11:02:58 +02:00
Vitaly Baranov
92e0ee0b6f More detailed error messages. 2022-07-03 14:20:19 +02:00
Vitaly Baranov
031ca28fdc Add test for partition clause. More checks for data compatibility on restore. 2022-06-30 08:37:18 +02:00
Vitaly Baranov
8a7c970ce0 Fix style. 2022-06-19 15:58:26 +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
21f3bed435 Simplify path calculations in 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
Vitaly Baranov
724bc4dc57 Move backup/restore code to storages and databases - part 1. 2022-06-15 20:28:43 +02:00
Vitaly Baranov
73b1894a21 Rework collecting replicated parts. 2022-06-15 20:28:42 +02:00
Nikolai Kochetov
1b85f2c1d6 Merge branch 'master' into refactor-read-metrics-and-callbacks 2022-05-25 16:27:40 +02:00
Nikolai Kochetov
56feef01e7 Move some resources 2022-05-20 19:49:31 +00:00
Vitaly Baranov
dfa1053b9f Use query scopes for async backup/restore. 2022-05-13 10:35:02 +02:00
Vitaly Baranov
dd51265218
Merge pull request #36864 from vitlibar/backup-improvements-4
Backup improvements
2022-05-05 15:37:51 +02:00
Vitaly Baranov
160bc288d3 Fix implementation of totalBytes() & totalRows() for Log family. 2022-05-04 00:15:21 +02:00
Vitaly Baranov
828f45f078 Add new restore setting 'allow_non_empty_tables'. 2022-05-03 16:18:45 +02:00
Robert Schulze
330212e0f4
Remove inherited create() method + disallow copying
The original motivation for this commit was that shared_ptr_helper used
std::shared_ptr<>() which does two heap allocations instead of
make_shared<>() which does a single allocation. Turned out that
1. the affected code (--> Storages/) is not on a hot path (rendering the
performance argument moot ...)
2. yet copying Storage objects is potentially dangerous and was
   previously allowed.

Hence, this change

- removes shared_ptr_helper and as a result all inherited create() methods,

- instead, Storage objects are now created using make_shared<>() by the
  caller (for that to work, many constructors had to be made public), and

- all Storage classes were marked as noncopyable using boost::noncopyable.

In sum, we are (likely) not making things faster but the code becomes
cleaner and harder to misuse.
2022-05-02 08:46:52 +02:00