Commit Graph

28 Commits

Author SHA1 Message Date
Mike Kot
8b6376005a "reconfig" support for CH Keeper 2023-07-07 00:20:54 +03:00
Antonio Andelic
bde2cf96b1 Better 2023-05-22 12:24:16 +00:00
LiuYangkuan
f29700bd2f use IDisk to do IO in Keeper's snapshots and logs 2023-02-02 19:47:30 +08:00
Antonio Andelic
183f5cc940 Add checksum to the state file 2022-07-10 15:01:38 +00:00
Antonio Andelic
f60074e9ec Make state durable 2022-07-10 09:33:49 +00:00
Dmitry Novik
2ed5a4013a
Revert "Revert "Memory overcommit: continue query execution if memory is available"" 2022-05-03 00:45:13 +02:00
alesapin
f0b7af0aa2
Revert "Memory overcommit: continue query execution if memory is available" 2022-05-03 00:36:50 +02:00
mergify[bot]
e9fde5d067
Merge branch 'master' into memory-overcommit-free 2022-04-29 19:31:59 +00:00
Antonio Andelic
ff2ebe113c WIP 2022-04-19 08:08:35 +00:00
Antonio Andelic
dbd88a5acb Use 1 leader quorum for recovery 2022-04-19 08:08:35 +00:00
Antonio Andelic
bb4bc17af1 Force recover from configuration 2022-04-19 08:08:35 +00:00
alesapin
c0317c818c Fix bug in keeper 2022-04-14 17:33:46 +02:00
Antonio Andelic
d296eeee2d Small changes for Keeper 2022-04-05 13:56:28 +00:00
Maksim Kita
65c52298b6 Fix clang-tidy warnings in Compression, Coordination, Core folders 2022-03-14 18:17:35 +00:00
Azat Khuzhin
0025110a16 Replace exit() with abort() in case of NuRaft errors
CI founds [1]:

    WARNING: ThreadSanitizer: data race (pid=99)
      Write of size 8 at 0x7b14002192b0 by thread T27:
        12 std::__1::map<>
        13 DB::OpenedFileCache::~OpenedFileCache() obj-x86_64-linux-gnu/../src/IO/OpenedFileCache.h:27:7 (clickhouse+0xac66de6)
        14 cxa_at_exit_wrapper(void*) crtstuff.c (clickhouse+0xaa3646f)
        15 decltype(*(std::__1::forward<nuraft::raft_server*&>(fp0)).*fp()) std::__1::__invoke<void ()(), nuraft::raft_server*&, void>()

      Previous read of size 8 at 0x7b14002192b0 by thread T37 (mutexes: write M732116415018761216):
        4 DB::OpenedFileCache::get() obj-x86_64-linux-gnu/../src/IO/OpenedFileCache.h:47:37 (clickhouse+0xac66784)

    Thread T27 'nuraft_commit' (tid=193, running) created by main thread at:
    ...
    Thread T37 'MergeMutate' (tid=204, running) created by main thread at:
    ...

But it also reports that the mutex was already destroyed:

    Mutex M732116415018761216 is already destroyed.

The problem is that [nuraft can call `exit()`](1707a7572a/src/handle_commit.cxx (L157-L158)) which will call atexit handlers:

    2022.02.17 22:54:03.495450 [ 193 ] {} <Error> RaftInstance: background committing thread encounter err Memory limit (total) exceeded: would use 56.56 GiB (attempt to allocate chunk of 8192 bytes), maximum: 55.82 GiB, exiting to protect the system

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/33057/5a8cf3ac98808dadf125068a33ed9c622998a484/fuzzer_astfuzzertsan,actions//report.html

Let's replace exit() with abort() to avoid this.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-02-19 13:05:08 +03:00
alesapin
3f8f08e816 Slightly better 2021-11-19 12:30:58 +03:00
alesapin
5f3eca4cd1 Merge branch 'master' into JackyWoo_add_4_letter_words_commands 2021-11-17 12:59:20 +03:00
Alexey Milovidov
8b4a6a2416 Remove cruft 2021-10-28 02:10:39 +03:00
JackyWoo
a60663e33d add 4lw commands to keeper 2021-10-27 20:26:42 +08:00
alesapin
042eebd981 Add test for leader remove 2021-10-19 16:37:28 +03:00
alesapin
647856658f Add synchronization and active wait 2021-10-19 16:11:29 +03:00
alesapin
2d4b601d38 Better 2021-10-19 15:00:26 +03:00
alesapin
bfe2a937eb At least able to start 2021-10-18 18:27:51 +03:00
alesapin
31181095e7 Review fixes 2021-05-18 17:08:56 +03:00
alesapin
ef34c95c7e Add SSL to keeper (both client and internal) 2021-04-12 15:25:52 +03:00
alesapin
c28a3b860c Fix Coordination darwin build 2021-04-08 17:17:57 +03:00
alesapin
be132a32a2 More renames 2021-03-29 11:24:56 +03:00
alesapin
e936bb1dae Rename files 2021-03-29 10:58:42 +03:00