Commit Graph

57 Commits

Author SHA1 Message Date
Alexander Tokmakov
f5cf039190 check if a symlink exists more carefully 2023-03-08 00:04:55 +01:00
Azat Khuzhin
6b42b66257 Simply filesystem helpers to check is-readable/writable/executable
Use one system call - faccessat(), over multiple system calls.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-01-27 21:11:10 +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
Raúl Marín
0785bf6b29 Do not throw DB::Exception when folders do not exist 2023-01-03 17:05:54 +01:00
vdimir
d30d25dbbe
Temporary files evict fs cache 2022-12-22 10:22:49 +00:00
Vladimir C
7d6950d397
Revert "Temporary files evict fs cache" 2022-12-02 14:50:56 +01:00
vdimir
7a814d2854
wip: temporary files evict fs cache 2022-12-01 11:49:24 +00:00
vdimir
98fe3c6c02
Temporary files evict fs cache 2022-12-01 11:49:17 +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
Vladimir C
ddde5096ef
Merge branch 'master' into vdimir/tmp-file-metrics 2022-08-25 15:23:35 +02:00
vdimir
7194df1184
Move back TemporaryFile -> TemporaryFileOnDisk 2022-08-24 16:14:11 +00:00
vdimir
8701a909a2
enoughSpaceInDirectory works if file is not created yet 2022-08-24 16:14:09 +00:00
vdimir
51c44424cc
More metrics for temp files 2022-08-24 16:14:09 +00:00
vdimir
cd4038d511
Use TemporaryFileOnDisk instead of Poco::TemporaryFile 2022-08-24 16:14:08 +00:00
alesapin
d8664c3227 Add shortcut for backups 2022-08-19 16:58:30 +02:00
Alexander Tokmakov
0e22b4b800
Update src/Common/filesystemHelpers.cpp
Co-authored-by: alesapin <alesapin@clickhouse.com>
2022-08-15 14:25:25 +03:00
Alexander Tokmakov
6f5a7c3bf7 fix a bug with symlinks detection 2022-08-15 12:30:47 +02:00
Raúl Marín
3fd327b23a Use std::filesystem::path::operator/ 2022-07-14 19:25:40 +02:00
Raúl Marín
35d3a0dd1f Don't report system.errors when the disk is not rotational 2022-07-14 11:08:26 +02:00
kssenii
4c88527c8e Review fixes 2022-07-09 19:35:07 +02:00
kssenii
bf1c99daab Refactoring of object storages, add LocalObjectStorage 2022-07-09 12:39:31 +02:00
Alexander Tokmakov
74f38710a8 Merge branch 'master' into cleanup_garbage_in_store_dir 2022-06-23 21:43:28 +02:00
Alexander Tokmakov
ba0fcec993 add background cleanup of store/ subdirs 2022-06-21 12:35:47 +02:00
kssenii
5dd1bb2fd8 improvements for getFileSize 2022-06-20 15:22:56 +02:00
kssenii
74cffaf186 Merge master 2022-06-14 00:45:19 +02:00
kssenii
4859e11c27 Review fixes 2022-06-12 01:15:10 +02:00
kssenii
7a2676c7ab Clean up broken detached parts with timeout 2022-06-10 12:27:57 +02:00
Robert Schulze
1a0b5f33b3
More consistent use of platform macros
cmake/target.cmake defines macros for the supported platforms, this
commit changes predefined system macros to our own macros.

__linux__ --> OS_LINUX
__APPLE__ --> OS_DARWIN
__FreeBSD__ --> OS_FREEBSD
2022-06-10 10:22:31 +02:00
Alexey Milovidov
c50791dd3b Fix clang-tidy-14, part 1 2022-05-27 22:52:14 +02:00
Julian Gilyadov
a4f56f3330
Throw exception when file cant be executed instead of displaying success 2022-04-12 17:52:44 +02:00
alesapin
d3fbd9b2ad Fix style 2022-03-24 11:25:28 +01:00
serxa
7ea3c003d5 fix style 2022-02-15 10:39:45 +00:00
Sergei Trifonov
2b0b03276b add simple sanity checks for server startup 2022-02-13 19:58:38 +03:00
kssenii
059fc1de69 Allow symlinks in file storage 2021-10-17 09:11:06 +00:00
kssenii
46a4525c21 Fix 2021-09-29 12:53:09 +00:00
Kseniia Sumarokova
c68793cd12
Update filesystemHelpers.cpp 2021-08-19 12:14:41 +03:00
Kseniia Sumarokova
b03f851cba
Update filesystemHelpers.cpp 2021-08-19 11:39:50 +03:00
Kseniia Sumarokova
df0303f9ba
Update filesystemHelpers.cpp 2021-08-19 11:19:23 +03:00
Kseniia Sumarokova
f5a91e5e5f
Fix style check 2021-08-18 23:17:00 +03:00
kssenii
94d68ee8ac Fix, add test 2021-08-18 14:14:53 +00:00
kssenii
941cbc43f3 Fix 2021-08-18 11:31:12 +00:00
kssenii
69816e6eff Fix checks 2021-05-30 15:44:58 +03:00
kssenii
0a3589524e File movement 2021-05-29 00:57:53 +03:00
kssenii
2a631aaf08 Final fixes 2021-05-29 00:34:44 +03:00
kssenii
a0d8d689d3 Merge branch 'master' of github.com:ClickHouse/ClickHouse into poco-file-to-std-fs 2021-05-27 15:44:12 +03:00
Maksim Kita
b26783b308 Dictionaries update file path restrictions 2021-05-27 00:17:45 +03:00
kssenii
81797393f1 fs::last_write_time, fs::space 2021-05-12 09:19:11 +03:00
kssenii
393b026f2e Merge branch 'master' of github.com:ClickHouse/ClickHouse into poco-file-to-std-fs 2021-05-11 16:49:23 +03:00
Alexey Milovidov
ad88819ee4 Fix a bunch of warnings from PVS-Studio 2021-05-08 19:13:10 +03:00
kssenii
549b5f8a0c Update Common/* 2021-04-30 23:16:35 +03:00