Commit Graph

1609 Commits

Author SHA1 Message Date
Anton Popov
c4d4f2dbed better interface 2022-10-25 22:14:06 +00:00
Anton Popov
c8199bc125
Merge branch 'master' into refactor-data-part 2022-10-25 14:31:05 +02:00
Nikolai Kochetov
5c4444237e
Merge pull request #42617 from ClickHouse/revert-revert-41268-disable-s3-parallel-write-for-part-moves-to-disk-s3
Revert revert 41268 disable s3 parallel write for part moves to disk s3
2022-10-25 14:29:27 +02:00
Nikolai Kochetov
5dabbf89ad Fixing build. 2022-10-24 13:43:24 +02:00
Anton Popov
56e5daba0c remove DataPartStorageBuilder 2022-10-23 00:23:15 +00: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
Nikolai Kochetov
57ffcb7ed0 Revert "Merge pull request #41681 from ClickHouse/revert-41268-disable-s3-parallel-write-for-part-moves-to-disk-s3"
This reverts commit 7956c2becf, reversing
changes made to 57be648984.
2022-10-20 19:51:27 +02:00
Vitaly Baranov
1365105bc4 Implement backup to S3 2022-10-19 00:04:41 +02:00
Vitaly Baranov
eb637a6f81
Merge pull request #42232 from azat/backups/s3
Support BACKUP to S3 with as-is path/data structure
2022-10-18 02:37:07 +02:00
filimonov
cd9afdcb7c
Increase request_timeout_ms for s3 disks. 2022-10-14 17:19:14 +02:00
Azat Khuzhin
8830f0608d Support BACKUP to S3 with as-is path/data structure
Right now backup to S3 does not make a lot of sense, since:
- it has random names, and to decoding them
- requires metadata from local disk (/var/lib/disks/DISK/BACKUP_NAME)
- or send_metadata (but it is also tricky even with it)

So this patch adds simpler interface for S3, it is only suitable for
BACKUP/RESTORE, so don't try to use it for MergeTree engine.

It is done by adding separate disk - `s3_plain` for this, that:
- does not support any extended features, like renames/hardlinks/attrs/...
  (so basically everything that MergeTree requires)
- only write/read/unlink/list files

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-14 12:59:25 +02:00
vdimir
0178307c27 Followup for TemporaryDataOnDisk 2022-10-12 15:25:23 +02:00
Azat Khuzhin
688edafcc6 Disks/ObjectStorages: add comments for some classes
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-11 17:21:26 +02:00
Azat Khuzhin
f3833e3a53 Introduce StaticDirectoryIterator
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-11 17:19:35 +02:00
Alexander Tokmakov
bd10a9d2d4
Merge pull request #42168 from ClickHouse/unreachable_macro
Abort instead of `__builtin_unreachable` in debug builds
2022-10-08 19:05:57 +03:00
Alexander Tokmakov
4175f8cde6 abort instead of __builtin_unreachable in debug builds 2022-10-07 21:49:08 +02:00
kssenii
53d54ae6c9 Fix 2022-10-07 12:26:54 +02:00
Kseniia Sumarokova
eb6e60753d
Merge pull request #42129 from kssenii/fix-non-async-buffer
Fix buffer resize with `remote_filesystem_read_method=read` + fs cache
2022-10-07 12:05:53 +02:00
kssenii
2d96c81f4c Fix 2022-10-06 17:09:20 +02:00
Robert Schulze
cc24fcd6d5
Merge pull request #41873 from ClickHouse/generated-file-cleanup
Consolidate CMake-generated config headers
2022-10-06 14:31:03 +02:00
Raúl Marín
adbaaca2f5
QOL log improvements (#41947)
* Uniformize disk reservation logs

* Remove log about destroying stuff that appears all the time

* More tweaks on disk reservation logs

* Reorder logs in hash join

* Remove log that provides little information

* Collapse part removal logs

Co-authored-by: Sergei Trifonov <sergei@clickhouse.com>
2022-10-06 14:22:44 +02:00
Robert Schulze
da5a2e2db0
Merge remote-tracking branch 'origin/master' into generated-file-cleanup
Physical merge conflicts:
- src/Common/ZooKeeper/ZooKeeperImpl.cpp
- src/Core/config_core.h.in
- src/Functions/FunctionsAES.h
- src/Functions/config_functions.h.in
- src/configure_config.cmake

Logical merge conflicts:
- Functions/tryDecrypt.cpp
2022-10-06 08:43:25 +00:00
kssenii
2ab884359e More efficient WriteBufferFromAzureBlobStorage 2022-10-03 22:15:04 +02:00
kssenii
c6d7cd5820 Fix write into azure blob storage 2022-10-03 18:54:07 +02:00
Robert Schulze
db5ef7b3cb
Merge branch 'master' into generated-file-cleanup 2022-10-02 23:13:18 +02:00
Vitaly Baranov
7be9744bab Remove confusing warning when inserting with perform_ttl_move_on_insert=false. 2022-09-30 20:51:48 +02:00
Vladimir C
895afdec45
Merge pull request #40893 from ClickHouse/vdimir/track-tmp-disk 2022-09-30 11:27:24 +02:00
Robert Schulze
cc92a2d174
Merge branch 'master' into generated-file-cleanup 2022-09-30 09:56:31 +02:00
Alexander Tokmakov
4e422b8046
Merge pull request #41741 from ClickHouse/fix_intersecting_parts
Fix intersecting parts
2022-09-29 18:00:22 +03:00
vdimir
f495361e28
fixes for TemporaryDataOnDisk 2022-09-29 10:09:29 +00:00
vdimir
1234b70118
Handle decorator checking tmp disk type 2022-09-29 09:51:49 +00:00
Robert Schulze
f24fab7747
Fix some #include atrocities 2022-09-28 13:49:28 +00:00
Robert Schulze
78fc36ca49
Generate config.h into ${CONFIG_INCLUDE_PATH}
This makes the target location consistent with other auto-generated
files like config_formats.h, config_core.h, and config_functions.h and
simplifies the build of clickhouse_common.
2022-09-28 12:48:26 +00:00
Kseniia Sumarokova
6037da1ca8
Update CachedOnDiskReadBufferFromFile.cpp 2022-09-28 14:04:39 +02:00
Alexander Tokmakov
287fe40173 Merge branch 'master' into fix_intersecting_parts 2022-09-27 16:55:39 +02:00
Kseniia Sumarokova
caf6a99f41
Merge pull request #41011 from kssenii/fix-thread-status
Fix incorrect attach query in threadpool readers, get rid of static threadpools for reads/writes, make threadpool size for reads/writes configurable
2022-09-27 11:35:07 +02:00
Kseniia Sumarokova
e4f9d311c3
Merge pull request #41731 from kssenii/fix-azure-tests
Try fix azure tests
2022-09-27 11:01:19 +02:00
Alexander Tokmakov
9501f88f8c
Merge branch 'master' into fix_intersecting_parts 2022-09-26 19:53:59 +03:00
alesapin
31f6636a47 Fix endless remove 2022-09-26 16:33:25 +02:00
kssenii
921776625e Fix integration tests 2022-09-26 16:20:00 +02:00
kssenii
a02354458a Review fixes 2022-09-26 12:27:29 +02:00
Kseniia Sumarokova
c53f463d2d
Update S3ObjectStorage.cpp 2022-09-25 15:15:59 +02:00
Kseniia Sumarokova
50f7ce6107
Merge branch 'master' into fix-thread-status 2022-09-24 17:22:45 +02:00
Kseniia Sumarokova
21e09f3e1f
Merge pull request #41733 from kssenii/cache-logging-level-reduce
Change logging levels in cache
2022-09-24 17:20:46 +02:00
alesapin
34d9794ab7
Merge pull request #41653 from ClickHouse/investigating_more_bugs
Add very explicit logging on disk choice for fetch
2022-09-24 16:15:02 +02:00
Kseniia Sumarokova
307314e1bd
Update CachedOnDiskReadBufferFromFile.cpp 2022-09-24 13:42:58 +02:00
kssenii
0a801dad2a Merge remote-tracking branch 'upstream/master' into fix-thread-status 2022-09-23 19:39:07 +02:00
kssenii
30726721ad Fix threadpool reader (for local fs) 2022-09-23 19:35:16 +02:00
Kseniia Sumarokova
81aa9b9199
Update WriteBufferFromAzureBlobStorage.cpp 2022-09-23 15:34:39 +02:00
kssenii
c122e4dd1f Refactor log levels 2022-09-23 15:32:05 +02:00
kssenii
3725397040 Try fix azure tests 2022-09-23 15:24:10 +02:00
kssenii
ab702e43fc Merge remote-tracking branch 'upstream/master' into fix-thread-status 2022-09-23 15:21:33 +02:00
alesapin
148f018eae Fix style: 2022-09-23 14:32:19 +02:00
alesapin
dff61267b4 More explicit logs 2022-09-23 14:31:05 +02:00
Kseniia Sumarokova
a0c5da3459
Merge pull request #41652 from kssenii/fix-disk-web
Fixes for disk web
2022-09-23 12:43:50 +02:00
kssenii
0e8343e6f3 Revert "Better config for cache"
This reverts commit 0ca6aadbdb.
2022-09-22 17:57:44 +02:00
kssenii
7b8c63b4e4 Merge remote-tracking branch 'origin/fix-disk-web' into fix-disk-web 2022-09-22 16:24:13 +02:00
kssenii
109d2ad022 Better 2022-09-22 16:22:05 +02:00
alesapin
ca410b7a0b
Merge pull request #41147 from ClickHouse/enable_projections_and_zero_copy
Enable projections and zero copy replication
2022-09-22 13:05:09 +02:00
Alexander Tokmakov
021b882455 Revert "Disable parallel s3 multipart upload for part moves. (#41268)"
This reverts commit 0414d95878.
2022-09-22 13:59:25 +03:00
Kseniia Sumarokova
956e0e8634
Update WebObjectStorage.cpp 2022-09-21 21:51:32 +02:00
kssenii
cb442a3ad7 Fixes for disk web 2022-09-21 21:26:55 +02:00
Nikolai Kochetov
0414d95878
Disable parallel s3 multipart upload for part moves. (#41268)
* Disable parallel s3 multipart upload for part moves.

* Add setting s3_allow_parallel_part_upload
2022-09-21 19:10:32 +02:00
alesapin
3e74b783c2
Merge pull request #41530 from ClickHouse/fix_parts_removal_on_drop
Slightly better parts removal on drop + add unrelated test
2022-09-21 12:42:41 +02:00
alesapin
ffa9ab1d1c
Merge branch 'master' into enable_projections_and_zero_copy 2022-09-20 14:58:03 +02:00
alesapin
8d88b68a85
Merge pull request #41415 from ClickHouse/revert_prefixes_s3
Revert prefixes s3 + add retries on write requests unexpected errors
2022-09-20 12:55:04 +02:00
alesapin
66dc1e5597 Merge branch 'master' into fix_parts_removal_on_drop 2022-09-20 12:35:03 +02:00
alesapin
e9d31977f3
Merge branch 'master' into enable_projections_and_zero_copy 2022-09-20 12:25:10 +02:00
Kseniia Sumarokova
3c7bbad0b0
Merge pull request #41437 from kssenii/fix-logical-error-write-through-cache
Fix assertion in write-through cache
2022-09-20 11:51:19 +02:00
Alexey Milovidov
03bbf0676f
Merge branch 'master' into revert_prefixes_s3 2022-09-20 06:14:07 +03:00
Alexey Milovidov
37a4be249b
Merge pull request #41483 from amosbird/jbod-fix1
Fix nullptr dereference in DB::VolumeJBOD::reserve
2022-09-20 06:08:14 +03:00
alesapin
ee24b21aaf Fix revert order 2022-09-19 21:19:36 +02:00
serxa
2ef696ffe1 fix issues 2022-09-19 18:40:32 +00:00
serxa
7a1d4a404a add DiskS3* profile events per S3 API calls 2022-09-19 18:10:47 +00:00
serxa
f8aa738511 more conventional profile events names 2022-09-19 17:23:22 +00:00
Sergei Trifonov
ff2e1ff8d8
Merge branch 'master' into support_s3_api_event_metrics 2022-09-19 14:35:45 +02:00
Kseniia Sumarokova
631aad1671
Merge branch 'master' into fix-logical-error-write-through-cache 2022-09-19 12:29:55 +02:00
Amos Bird
d2601b8192
Add a comment 2022-09-19 14:41:34 +08:00
Amos Bird
09b75901f0
Fix nullptr deref 2022-09-19 14:07:31 +08:00
Alexey Milovidov
6a09340f11
Merge pull request #41459 from azat/io/threadpoolreader-elapsed
Account any IO that is done from ThreadPoolReader
2022-09-19 09:04:20 +03:00
alesapin
a5a9d89fb9
Merge branch 'master' into enable_projections_and_zero_copy 2022-09-18 17:20:08 +02:00
alesapin
e4c120742e Add missed throw expression 2022-09-18 16:56:19 +02:00
Kseniia Sumarokova
d6748b182f
Update CachedOnDiskWriteBufferFromFile.cpp 2022-09-18 14:48:24 +02:00
Azat Khuzhin
64b44be513 Account any IO that is done from ThreadPoolReader
In case of some issues with the disk it is possible that
preadv2(RWF_NOWAIT)==EAGAIN can take a lot of time, so let's measure
even this case.

I've verified with a simple (almost) loop of preadv2(RWF_NOWAIT), and
got this:

    EAGAIN: 8565670 (out of 17148317)
    EAGAIN: 8565670 (out of 17148317)
    EAGAIN: 8565670 (out of 17148317)
    too long at offset=8691694, ret=18446744073709551615 (14.5016)
    too long at offset=8694766, ret=18446744073709551615 (14.4338)
    too long at offset=8694766, ret=18446744073709551615 (16.2144)

So here you can see that preadv2(RWF_NOWAIT) took 14-16 seconds in case
of failure.

Complete code can be found here [1].

  [1]: https://gist.github.com/azat/f4a6b0750316c42bec021064e0a7627c

I came up with this patch because I saw some stranginess in
ProfileEvents, that does not show all the time that was spend in IO when
pread_threadpool method was used.
Also there was some stranginess with trace_log too.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-09-18 10:05:21 +02:00
Alexey Milovidov
6b752bff3a
Merge branch 'master' into revert_prefixes_s3 2022-09-18 07:10:57 +03:00
Alexey Milovidov
f4a48cd4d6 Remove cruft 2022-09-17 22:16:31 +02:00
kssenii
51745dcb43 Fix assertion in write-through cache 2022-09-17 20:20:32 +02:00
alesapin
d9c3549cc8 Revert s3 prefixes + add retries on write requests unexpected errors 2022-09-16 14:43:43 +02:00
alesapin
456da30c9f Revert "Merge pull request #41249 from ClickHouse/revert-40968-s3-sharding-2"
This reverts commit ac60300997, reversing
changes made to a9c272283a.
2022-09-16 14:06:26 +02:00
alesapin
b4d2d217f4
Merge branch 'master' into enable_projections_and_zero_copy 2022-09-16 13:53:17 +02:00
Kseniia Sumarokova
9e37a6356f
Merge pull request #41297 from kssenii/fix-logical-error
Fix incorrect logical error in disk object storage
2022-09-15 12:00:53 +02:00
Kseniia Sumarokova
69f38a6228
Merge pull request #41330 from kssenii/fix-composable-cache-setting-incompatibility
Fix incompatibility of cache after switching setting `do_no_evict_...` from 1 to 0, 0 to 1
2022-09-15 12:00:22 +02:00
Kseniia Sumarokova
780c0e9b2f
Update CachedOnDiskReadBufferFromFile.cpp 2022-09-15 00:18:23 +02:00
Kseniia Sumarokova
0b1c2c62fd
Update CachedOnDiskReadBufferFromFile.cpp 2022-09-14 20:59:45 +02:00
kssenii
559c696230 Fix 2022-09-14 20:35:28 +02:00
alesapin
9d3ab9a7f7 Merge branch 'master' into enable_projections_and_zero_copy 2022-09-14 15:16:16 +02:00
mateng0915
31a0900756 deleted local file 2022-09-14 19:19:47 +08:00
mateng0915
5badb1b186 resolve the review comments 2022-09-14 19:19:40 +08:00
teng.ma
ebea9f9359 Feature: Support Event Tracing when calling Aws S3 API
Description:
============
In  Computing && Storage Architecture,  using S3 as remote / Shared storage, the Method to access S3 is using AWS S3 API
There is a gap between ClickHouse DB with Ozone Operation
In ClickHouse, operation is SQL and background task
In S3 , the operation should be AWS S3 API
And one sql maybe can mapped to multiple  API

Solution:
=========
Added Calling API as event into system.events table
2022-09-14 19:18:31 +08:00
Kseniia Sumarokova
cc639f2e2d
Update CachedOnDiskReadBufferFromFile.cpp 2022-09-14 13:13:02 +02:00
Kseniia Sumarokova
52db0e5c40
Update DiskObjectStorageMetadata.cpp 2022-09-14 11:52:23 +02:00
kssenii
ea31302071 Fix 2022-09-14 11:30:06 +02:00
alesapin
2cecf9e55f Fix bug 2022-09-13 18:30:55 +02:00
kssenii
52ef3758c4 Merge remote-tracking branch 'upstream/master' into fix-thread-status 2022-09-13 16:34:31 +02:00
alesapin
9af591a328
Revert "Sharding s3 key names (2)" 2022-09-13 12:29:02 +02:00
Kseniia Sumarokova
3dd28bb79a
Merge pull request #41042 from kssenii/refactor-cache-for-async-download
Cache refactoring for async download
2022-09-13 12:26:35 +02:00
kssenii
a07f3d4bea Fix 2022-09-12 18:45:48 +02:00
kssenii
413fbb6507 Self-review fixes 2022-09-12 15:46:11 +02:00
kssenii
5cba9b789c Merge remote-tracking branch 'upstream/master' into refactor-cache-for-async-download 2022-09-09 14:14:04 +02:00
kssenii
c2c35278ba Refactor cache for async download 2022-09-09 13:12:47 +02:00
alesapin
5e00124f8a More logging for S3 2022-09-08 16:18:21 +02:00
kssenii
3dc19b4fe2 Fix 2022-09-08 12:23:59 +02:00
Kseniia Sumarokova
a270eeef91
Merge pull request #41008 from kssenii/refactor-merge-tree-read
Small refactoring around merge tree readers (get rid of data part ptr)
2022-09-07 18:27:33 +02:00
kssenii
e06ed0962e Fix style check and typos check 2022-09-07 17:56:20 +02:00
kssenii
e51313b6b3 Get rid of static threadpools 2022-09-07 17:48:11 +02:00
alesapin
43493389b9 Merge branch 'master' into one_more_logging 2022-09-06 19:40:24 +02:00
Kseniia Sumarokova
3558361a05
Merge branch 'master' into refactor-merge-tree-read 2022-09-06 16:00:43 +02:00
alesapin
422b1658eb Review fix 2022-09-06 14:42:48 +02:00
alesapin
6ea7f1e011 Better exception handling for ReadBufferFromS3 2022-09-06 13:59:55 +02:00
Sergei Trifonov
f77809ddbc
Merge pull request #40900 from ClickHouse/s3-detailed-metrics
S3 detailed metrics
2022-09-06 13:20:57 +02:00
Alexey Milovidov
4c30dbc905
Merge pull request #40968 from ClickHouse/s3-sharding-2
Sharding s3 key names (2)
2022-09-05 22:47:25 +03:00
Kruglov Pavel
cadae5a2f6
Merge pull request #40896 from kssenii/fix-memory-usage-for-remote
Fix extra memory allocation for remote read buffers
2022-09-05 20:38:57 +02:00
kssenii
8f064a1720 Fix 2022-09-05 20:28:06 +02:00
kssenii
83514fa2ef Refactor 2022-09-05 20:08:22 +02:00
Sergei Trifonov
1c247308f1
Merge branch 'master' into s3-detailed-metrics 2022-09-05 15:55:41 +02:00
Alexey Milovidov
712de53033 Sharding s3 key names 2022-09-04 04:15:45 +02:00
Sergei Trifonov
067e712fdf
Merge branch 'master' into s3-detailed-metrics 2022-09-02 16:59:52 +02:00
alesapin
521e2cc22e Merge branch 'master' into stress_s3 2022-09-02 12:57:29 +02:00
Antonio Andelic
e64436fef3 Fix typos with new codespell 2022-09-02 08:54:48 +00:00
Sergei Trifonov
ac9dc53c73 Merge branch 'master' into s3-detailed-metrics 2022-09-01 18:31:02 +02:00
Sergei Trifonov
bcb6475c4a add separate s3 profile events for disk s3 2022-09-01 18:30:55 +02:00
alesapin
dbe3b777ec Fix build 2022-09-01 17:07:56 +02:00
alesapin
89930c315b Merge branch 'master' into stress_s3 2022-09-01 17:03:55 +02:00
kssenii
4fa291cf59 Fix hdfs read buffer too 2022-09-01 16:46:46 +02:00
kssenii
3134bdeb13 Fix 2022-09-01 16:35:28 +02:00
Nikita Mikhaylov
c7b0b87574
Better exception handling in DiskObjectStorageTransaction (#40813)
Co-authored-by: alesapin <alesapin@clickhouse.com>
2022-09-01 13:29:59 +02:00
kssenii
0f747e7987 Move cache files 2022-08-31 17:50:55 +02:00
Kseniia Sumarokova
54f6f5bb2c
Merge branch 'master' into fix-write-through-cache-logical-error 2022-08-30 13:30:13 +02:00
Kseniia Sumarokova
487100a4fd
Merge pull request #40764 from kssenii/fix-logical-error-in-cache
Remove incorrect check in fs cache
2022-08-30 11:59:56 +02:00
kssenii
db2bc31e17 Remove incorrect assertion 2022-08-29 19:32:47 +02:00
kssenii
545c6c8be4 Fix 2022-08-29 17:50:27 +02:00
Azat Khuzhin
6da5707f8f Fix possible missing detachQuery() in case of exception in readers
This can create leaks, since detachQuery() responsible for cleaning,
i.e. ThreadGroupStatus::finished_threads_counters_memory

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-08-29 11:30:17 +02:00
Azat Khuzhin
b16891da8d Avoid using of ThreadGroupStatus of the MainThreadStatus
One should not use MainThreadStatus, since ThreadGroupStatus can hold
some states, and it is better not to play with this, since this may
create leaks.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-08-29 11:30:17 +02:00
alesapin
133ca01447 Merge branch 'master' into stress_s3 2022-08-29 11:25:28 +02:00
Vladimir C
ddde5096ef
Merge branch 'master' into vdimir/tmp-file-metrics 2022-08-25 15:23:35 +02:00
alesapin
10fdc1e286 Fix stupid bug 2022-08-25 14:52:01 +02:00
alesapin
3ff6489fae Merge branch 'master' into stress_s3 2022-08-25 13:14:58 +02:00
alesapin
c4f8811701
Merge pull request #40395 from ClickHouse/data_source_description
Add copy shortcut for backups if dest and source support it
2022-08-25 12:36:30 +02:00
vdimir
91788f29e8
Upd TemporaryFileOnDisk 2022-08-24 16:15:54 +00:00
vdimir
7194df1184
Move back TemporaryFile -> TemporaryFileOnDisk 2022-08-24 16:14:11 +00:00