Commit Graph

44 Commits

Author SHA1 Message Date
Roman Khapov 104550b918
asan for all tests (#748)
* docker/Dockerfile: add odyssey build type

To check bugs in asan builds of existing tests

Signed-off-by: rkhapov <r.khapov@ya.ru>

* test_scram.sh: fix asan run

Signed-off-by: rkhapov <r.khapov@ya.ru>

* sources/storage.c: fix strtol usage

The msg string can be not null-terminated.

Signed-off-by: rkhapov <r.khapov@ya.ru>

* docker/Dockerfile: add vim

Useful for in-container debugging

Signed-off-by: rkhapov <r.khapov@ya.ru>

* test-lag.sh: add odyssey start waiting

To ensure odyssey started in some slow builds, like asan

Signed-off-by: rkhapov <r.khapov@ya.ru>

* sources/storage.c: rewrite watchdog

It contained use-after-free bug because of spagetti-code
Preformed little refactor

A little bit slower (for each repl lag query we allocate new client),
but doesnt significant because replication
lag checking is performed once per second.

Signed-off-by: rkhapov <r.khapov@ya.ru>

* test-lag.sh: add ody-stop

seems like it was missed

Signed-off-by: rkhapov <r.khapov@ya.ru>

---------

Signed-off-by: rkhapov <r.khapov@ya.ru>
Co-authored-by: rkhapov <r.khapov@ya.ru>
2025-01-11 15:23:47 +05:00
Roman Khapov 9a38f99c5f
docker/Dockerfile: run tests vs pg16 and ubuntu noble (#745)
Signed-off-by: rkhapov <r.khapov@ya.ru>
Co-authored-by: rkhapov <r.khapov@ya.ru>
2024-12-20 11:00:03 +05:00
Roman Khapov e8ef3513ab
run asan odyssey_test (#743)
* sources/machine.c: restore loop free

Signed-off-by: rkhapov <r.khapov@ya.ru>

* sources/address: add destroy function

To fix memory leak in hba rule

Signed-off-by: rkhapov <r.khapov@ya.ru>

* run_test: run asan odyssey_test

To help find bugs in unit-tests

Signed-off-by: rkhapov <r.khapov@ya.ru>

---------

Signed-off-by: rkhapov <r.khapov@ya.ru>
Co-authored-by: rkhapov <r.khapov@ya.ru>
2024-12-16 22:26:47 +05:00
Roman Khapov b494f126e6
Makefile: make format (#712)
This new command will help to run format on different envs
because of running formatting inside docker.

Previous make fmt will stay, but is not very suitable.


(cherry picked from commit d6dcd869f1)

Signed-off-by: rkhapov <r.khapov@yandex.ru>
2024-11-05 20:08:40 +05:00
Roman Khapov f191bb7bd6
Rm clang format 11 (#699)
* Makefile: use clang-format

clang-format-11 is older and requires waving
a dead chicken in modern systems.

Signed-off-by: rkhapov <r.khapov@ya.ru>
(cherry picked from commit b69027360f740aa196432ce1a93583d90b3b4a37)
Signed-off-by: rkhapov <r.khapov@ya.ru>

* Makefile: concurrency

concurrency 8 is too small for modern systems

+ fix apply_fmt to not format build directory, this will speed up
the apply_fmt command

Signed-off-by: rkhapov <r.khapov@ya.ru>
(cherry picked from commit 37961b5dfa774cd34f8ae680633e18fecd811e42)
Signed-off-by: rkhapov <r.khapov@ya.ru>

* fix github actions also

Signed-off-by: rkhapov <r.khapov@ya.ru>
(cherry picked from commit 00473a9af41be29445b353ef418efc6be0b7fb18)
Signed-off-by: rkhapov <r.khapov@ya.ru>

* use clang-format-17

Signed-off-by: rkhapov <r.khapov@ya.ru>

* remove run-clang-format

It will be moved into docker image later

Signed-off-by: rkhapov <r.khapov@ya.ru>

* clang-format: use run-clang-format from docker

Its more portable to use in different build envs

Signed-off-by: rkhapov <r.khapov@ya.ru>

* rm clang-format from install deps

Signed-off-by: rkhapov <r.khapov@ya.ru>

* apply new format

Signed-off-by: rkhapov <r.khapov@ya.ru>

---------

Signed-off-by: rkhapov <r.khapov@ya.ru>
Co-authored-by: rkhapov <r.khapov@ya.ru>
2024-10-04 17:49:07 +05:00
Ilya Shipitsin e573c7acd7
try to switch to docker compose v2 (#646)
Signed-off-by: Ilia Shipitsin <chipitsine@gmail.com>
2024-08-08 11:46:34 +05:00
reshke abf4e369f5
Add makefile and CMakeFiles code to use custom openssl in build (#529)
* Add makefile and CMakeFiles code to use custom openssl in build

* APlyy fmt and rebase
2023-08-31 13:25:58 +05:00
Andrey Borodin e3f08723f7
Fix UNIX socket connection to server (#499)
* Fix UNIX socket connection to server

target_session_attrs prevented usage usage of UNIX socket because
in some cases we need to pick any connection host. UNIX socket does
not posess one, so the code was SegFaulting.
2023-05-24 17:35:14 +05:00
kirill reshke 4bb40a6088
Refactor: fix memory leak in pool, rename config files, drop scram routes from sample dev conf file (#401) 2022-01-10 13:47:54 +05:00
kirill reshke 419037c4ae
Remove usage of non-thread-save function (getopt) usage (#395)
* Remove usage of non-thread-save function (getopt) usage

* Fix fmt

* Fix include popt

* shell tests for pgoptions
2021-12-26 02:18:30 +05:00
kirill reshke ba6513323f
Add storage watchdog with standby lag polling support (#380)
* Move auth query server querying logic to separate file

* Refactor query code to support not only "auth_query" like queries

* Move storage logic to separate file & add storage watchdog

* Force several settings on starts

* Fix simple query parsing

* Fixed bugs

* Fix config reload

* Add tests

* Move cathcup logic to separate func

* Fix tests[2]

Co-authored-by: Andrey Borodin <amborodin@acm.org>
2021-12-08 15:54:43 +05:00
reshke 70b4c6f3e6 Feature: ability to use connections separate pooling with auth query 2021-12-06 09:12:23 +00:00
reshke a9a6c07044 Refactor rule pool, add internal pooling feature 2021-12-06 08:28:02 +00:00
Andrey Borodin c9932b606b
Merge pull request #372 from reshke/master
Deb fixes for pgdg
2021-12-05 19:51:16 +03:00
reshke 8967555f61 Fix for auth query when user password is empty 2021-12-05 15:51:00 +00:00
kirill reshke 01f3c036b7
Update tls certs in test, regenerate them with 4096 bytes length, move test to docker (#374)
* Update tls certs in test, regenerate them with 4096 bytes length

* Fix compile errors

* Fix tests
2021-12-05 20:41:01 +05:00
reshke 63b981e8c0 Deb fixes for https://www.postgresql.org/message-id/flat/YOMyXyErQ50je0zh%40msg.df7cb.de#c997486f4403d814ff6d1967772e58eb 2021-12-03 21:52:33 +00:00
kirill reshke 763862ac8c
fix tests and drop travis ci (#358)
* Fix test

* replace clang-format-9 with clang-format

* Drop travis
2021-11-12 16:54:50 +05:00
reshke 3b6914672d fix a couple of coverity issues 2021-05-21 18:46:28 +05:00
reshke a78664e7b7 Add password_passthrough option to route 2021-05-19 17:18:49 +05:00
reshke 74623edfb5 LDAP auth in od 2021-04-28 17:54:56 +05:00
Andrey Borodin 3706f0eb2d Fix some warnings 2021-03-05 10:45:22 +05:00
Georgy Rylov 575f75d7cb
Add simple way to develop on Mac and refactor dockerfiles a little bit (#287) 2021-03-04 23:04:07 +05:00
reshke 34644bb931 do not drop client connection in transaction while reload 2021-02-18 18:36:44 +05:00
reshke e4bea27f66 introduse pool client idle timeout in session pooling mode 2021-02-12 02:30:03 +05:00
kirill reshke b546551bb8
do not hold repilation connections while online restart + drop conn rate logic (#266)
* do not hold repilation connections while online restart

* drop connection wtih rate (no more that 1 per sec)

* fix review

* eject info per-server

* use per thread global state to smoothly eject old connection

Co-authored-by: reshke <Kirill Reshke>
2021-01-23 18:49:54 +05:00
rechtem 40fd90eb7f
Fix Makefile in order to build on RHEL8/CentOS8 (#264) 2021-01-18 15:11:07 +05:00
kirill reshke 8a3831b082
Makefile build targets + quantileins memfree fix + online restart condition recheck (#261) 2021-01-14 11:54:16 +05:00
kirill reshke 23dafccc95
save config file name value on start (#260) 2021-01-12 15:18:24 +05:00
kirill reshke f305546e9c
fix scram build & tests, also make makefile a little bit more clear && better (#259)
* fix scram build & tests, also make makefile a little bit more clear and parametrized

* fix fmt & fmt target better

* remove shell test from tests run

Co-authored-by: reshke <Kirill Reshke>
2021-01-12 12:06:27 +05:00
reshke e35b687bd6 odyssey: fix test: sepaarse build and up 2020-12-30 22:25:40 +05:00
reshke 0d3af349ca fix test s exit code & fmt 2020-12-30 18:49:34 +05:00
kirill reshke c4878697ee
fix formatting & apply fmt target in MAkefiel (#251)
Co-authored-by: reshke <Kirill Reshke>
2020-12-28 16:22:53 +05:00
kirill reshke 3a55be6e61
change formatting (#250)
Co-authored-by: reshke <Kirill Reshke>
2020-12-28 15:43:31 +05:00
reshke b6447b3104 fix cmake minimum version 2020-12-17 17:58:25 +05:00
Georgy Rylov d89829aa4a
Quantiles aggregation (#245)
* add aggregated collection of quantiles for all db-user routes

* fix quantiles names and memory leak in right place

* make apply_fmt

* review fixes
2020-12-14 18:18:37 +05:00
reshke d98fdedde7 separate build & clean targets in Makefile 2020-12-07 13:19:57 +05:00
Daniil Zakhlystov dc9e2b03e7
Add kiwi to apply_fmt (#232) 2020-11-23 13:22:30 +05:00
kirill reshke bc568250bf
odyssey tests with asan, little test refactor (#225)
* odyssey tests with asan

* better headers, rework test

Co-authored-by: reshke <Kirill Reshke>
2020-10-27 13:47:25 +05:00
reshke 4e49e2f3b4 add coverity build target to makefile 2020-10-26 12:51:56 +05:00
kirill reshke 129ec0be83
fix scram, use postgresql 13 in build & tests (#223)
* fix scram, use postgresql 13 in build & tests

* move scram test inside docker

Co-authored-by: reshke <Kirill Reshke>
2020-10-26 10:00:17 +05:00
kirill reshke 070c2a7fe1
apply fmt && fix CI second try (#215)
Co-authored-by: reshke <Kirill Reshke>
2020-10-19 14:51:02 +05:00
reshke 52b0abb647 fix infinte loop + add signals tests 2020-08-10 13:39:09 +05:00
reshke f030093484 use SO_REUSEPORT to graceful shutdown 2020-08-10 13:39:09 +05:00