Commit Graph

137 Commits

Author SHA1 Message Date
Robert Schulze
b24ca8de52
Fix various clang-tidy warnings
When I tried to add cool new clang-tidy 14 warnings, I noticed that the
current clang-tidy settings already produce a ton of warnings. This
commit addresses many of these. Almost all of them were non-critical,
i.e. C vs. C++ style casts.
2022-04-20 10:29:05 +02:00
Alexander Tokmakov
07e66e690d Merge branch 'master' into mvcc_prototype 2022-02-11 15:53:32 +03:00
alexey-milovidov
38d92d0507
Merge pull request #33996 from save-my-heart/fix/signal_pipe_buf_size
reduce signal_pipe_buf_size
2022-02-06 04:50:47 +03:00
Alexander Tokmakov
ca5f951558 Merge branch 'master' into mvcc_prototype 2022-02-03 18:56:44 +03:00
Azat Khuzhin
bedf208cbd Use fmt::runtime() for LOG_* for non constexpr
Here is oneliner:

    $ gg 'LOG_\(DEBUG\|TRACE\|INFO\|TEST\|WARNING\|ERROR\|FATAL\)([^,]*, [a-zA-Z]' -- :*.cpp :*.h | cut -d: -f1 | sort -u | xargs -r sed -E -i 's#(LOG_[A-Z]*)\(([^,]*), ([A-Za-z][^,)]*)#\1(\2, fmt::runtime(\3)#'

Note, that I tried to do this with coccinelle (tool for semantic
patchin), but it cannot parse C++:

    $ cat fmt.cocci
    @@
    expression log;
    expression var;
    @@

    -LOG_DEBUG(log, var)
    +LOG_DEBUG(log, fmt::runtime(var))

I've also tried to use some macros/templates magic to do this implicitly
in logger_useful.h, but I failed to do so, and apparently it is not
possible for now.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

v2: manual fixes
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-02-01 14:30:03 +03:00
save-my-heart
cc3cbc6503 remove whitespace to pass style check 2022-01-26 23:05:07 +08:00
save-my-heart
62ba4833df fix dereference null pointer 2022-01-26 22:55:19 +08:00
save-my-heart
2c37b572d4 fix 2022-01-26 22:21:18 +08:00
save-my-heart
99c8736f00 fix build error on freebsd & aarch 2022-01-26 22:18:17 +08:00
save-my-heart
c1036f0b8e ensure signal_pipe_buf_size is <= PIPE_BUF 2022-01-25 22:43:44 +08:00
Alexander Tokmakov
e9a5a64a71 Merge branch 'master' into mvcc_prototype 2022-01-19 21:41:23 +03:00
Amos Bird
4e18368186
CI somehow finds another duplicated header 2022-01-19 14:37:59 +08:00
alexey-milovidov
d222cb9771
Merge pull request #33695 from amosbird/buildimprove
Some build improvement
2022-01-19 03:19:22 +03:00
Amos Bird
6d62060e16
Build improvement 2022-01-17 22:36:27 +08:00
Azat Khuzhin
aee034a597 Use explicit template instantiation for SystemLog
- Move some code into module part to avoid dependency from IStorage in SystemLog
- Remove extra headers from SystemLog.h
- Rewrite some code that was relying on headers that was included by SystemLog.h

v2: rebase
v3: squash move into module part with explicit template instantiation
    (to make each commit self compilable after rebase)
2022-01-10 22:01:41 +03:00
Alexander Tokmakov
7fcb79ae72 Merge branch 'master' into mvcc_prototype 2021-12-07 14:39:29 +03:00
Azat Khuzhin
96bd83c31e Do not reopen logs on USR1, HUP is enough
USR1 is also used for query_profiler_real_time_period_ns, let's not
overlap.
2021-12-03 01:32:57 +03:00
Kruglov Pavel
d9c1a0c8ec
Merge branch 'master' into fix-write-buffers 2021-11-20 17:48:24 +03:00
Nikolay Degterinsky
ddef6d86ca Minor fixes 2021-11-16 23:02:47 +00:00
Nikolay Degterinsky
2ae79233e4 Better 2021-11-16 23:02:47 +00:00
Nikolay Degterinsky
eafd3ddfac Add lz4 stream compression 2021-11-16 22:30:29 +00:00
Alexander Tokmakov
ce2f692bb4 Merge branch 'master' into mvcc_prototype 2021-11-15 14:56:50 +03:00
Azat Khuzhin
ed4b5c7640 Check stderr is writable before reopining it (to avoid losing errors) 2021-11-13 22:26:05 +03:00
avogar
c521a9131a Small refactoring of WriteBiffer-s 2021-11-11 02:11:18 +03:00
Alexander Tokmakov
92eec74ad7 Merge branch 'master' into mvcc_prototype 2021-11-06 21:08:36 +03:00
Alexey Milovidov
8b4a6a2416 Remove cruft 2021-10-28 02:10:39 +03:00
Denis Glazachev
ca7b69b0f3 Manipulate with -Wreserved-identifier only if HAS_RESERVED_IDENTIFIER has been detected 2021-10-03 17:42:36 +04:00
Alexey Milovidov
fe6b7c77c7 Rename "common" to "base" 2021-10-02 10:13:14 +03:00
Alexander Tokmakov
72b1b2e360 Merge branch 'master' into mvcc_prototype 2021-09-23 22:53:27 +03:00
Sergei Semin
baa7253677 fix -Wreserved-identifier in base/daemon/BaseDaemon.cpp 2021-09-10 11:41:49 +03:00
alexey-milovidov
44441535ff
Update BaseDaemon.cpp 2021-07-30 09:21:03 +03:00
Nikolai Kochetov
3d029e66fe
Update BaseDaemon.cpp 2021-07-29 17:00:33 +03:00
Nikolai Kochetov
3b8cb7e4bf Print trace from std::terminate exception line-by-line to make it grep easier. 2021-07-29 15:49:31 +03:00
Alexander Tokmakov
c74bfbf991 Merge branch 'master' into mvcc_prototype 2021-07-28 22:21:48 +03:00
Maksim Kita
67e9b85951 Merge ext into common 2021-06-16 23:28:41 +03:00
Alexander Tokmakov
9915bd0a8b Merge branch 'master' into mvcc_prototype 2021-06-03 00:52:57 +03:00
Alexander Tokmakov
5692db736c Merge branch 'master' into mvcc_prototype 2021-05-31 21:11:22 +03:00
kssenii
2a631aaf08 Final fixes 2021-05-29 00:34:44 +03:00
kssenii
f66c67a979 Fixes 2021-05-27 15:42:46 +03:00
kssenii
866b29fb5a Return list fds with Poco, more canonical 2021-05-23 10:56:13 +03:00
kssenii
8bac10d24f Update base/* 2021-05-22 21:24:13 +03:00
Alexander Tokmakov
529d1aeb19 fix merges of uncommitted parts 2021-05-18 20:07:29 +03:00
alesapin
41eadf9127 Something working 2021-05-12 16:04:34 +03:00
alexey-milovidov
e8583ddfe2
Update BaseDaemon.cpp 2021-02-20 09:10:15 +03:00
Azat Khuzhin
7474a7e3ca Increase buffer for uncaught exception / std::terminate
Use PIPE_BUF over some magic number 1024 in terminate_handler, since
according to pipe(7):

    PIPE_BUF
           POSIX.1  says  that  write(2)s of less than PIPE_BUF bytes must be atomic

Also note that 1024, is too small, especially for C++ stacktraces (and
especially for debug builds, that contains lots of non-inlined helpers
for various ptrs).
2021-02-19 22:45:06 +03:00
alexey-milovidov
bde4da0ff0
Merge pull request #20465 from azat/write-abnormal-server-termination-fixes
Fix abnormal server terminations due to write failures
2021-02-15 00:05:48 +03:00
Azat Khuzhin
06e8065ee6 Add missing sync of underlying files 2021-02-13 13:19:51 +03:00
Alexey Milovidov
edd5844bed Print stack trace on SIGTRAP 2021-02-13 00:29:47 +03:00
alexey-milovidov
4e32dbd024
Merge pull request #19317 from abyss7/dwarf-folly
Print inline frames for fatal stacktraces
2021-02-12 02:38:50 +03:00
Ivan
be831d09f7
Update Pytest check (#18972)
* [WIP]

* Update skip-list

* Update ci_config.json

* Do not sync inserts for test

* Fix more tests

* Fix another test

* Enable one more test

* More fixed tests

* More test fixes

* Do not absolutize server path for now

* More test fixes

* Unset CLICKHOUSE_LOG_COMMENT where necessary

* Remove debugging set -e

* Fix more tests

* Fix test reference

* Fix style check
2021-02-10 21:09:13 +03:00