Commit Graph

221 Commits

Author SHA1 Message Date
Andrey Borodin de02985941
Inverse priorities of new connections (#506)
* Inverse priorities of new connections

* Apply formatting

---------

Co-authored-by: root <root@odyssey-test2.ru-central1.internal>
2023-07-12 13:22:33 +05:00
reshke 39d0c3aeb3
Channel binding for SCRAM auth method (#490)
* Channel binding for SCRAM auth method

* Apply fmt
2023-07-10 14:04:48 +03:00
reshke 1cc42b1043
configure mandatory startup parameters for backend connections (#491) 2023-07-10 12:19:50 +05:00
Ilya Shipitsin ac69f62967
third_party/machinarium/sources/tls.c: add missing checks on malloc failure (#496) 2023-05-22 13:38:37 +05:00
Jayant Anand 6e9e5edb85
Bugs autocommit (#476)
* Solved the problem for packet sequence mismatch for  packet

* Corrected the forwarding for all types of packet

* Added the formating

* Changed formating

* Added clang format

* Changed format

Co-authored-by: janand <janand@yugabyte.com>
2022-11-21 18:34:24 +04:00
reshke f0ee140956
Fix memory leaks with system server shutdown, fix prepared statemnet memeory leak (#458)
Fix memory leaks with system server shutdown. 
Fix prepared statemnet memeory leak. 
Skip volatile param caching.
2022-08-23 18:39:43 +05:00
reshke 1710d40246
Target session attr feature for storage (#456)
* Target session attr feature for storage


Storage host section is now accepts a comma-separated
PostgreSQL hosts list, in format "host2,host2"
or "[host1]:port1,host2" etc.

Storage structure now holds pointer to host, which connection was acquired.
This is required to cancel`s queries to work fine.

Target session attrs policies added:

    read-write
    read-only
    any (default)

Target session attrs uses pg_is_in_recovery function to
check if host in primary or replica. in_hot_standby option is not checked yet.
2022-08-18 17:15:13 +05:00
kirill reshke 1b2edf66fe
Fix idle in transaction session timeout pgoption (#453)
FIx a typo. Advanced PGOPTIONS parsing was added between
1.1 and 1.2 odyssey versions, including idle_in_transaction_session_timeout
parameter passing. Thats means odyssey will lookup in startup parameter
key/value pairs and parse all hardcoded pgoptions, but this require full match
between hardcoded pgoption name and startup key
2022-08-08 12:57:07 +05:00
kirill reshke 42103a04b0
Add aarch64 support for machinarium context switch function (#446) 2022-07-25 12:50:55 +05:00
vadv 01ca5b345c
fix compression build (#441)
Co-authored-by: Dmitry Vasiliev <dmitrivasilyev@ozon.ru>
2022-06-23 12:30:10 +05:00
Firm 42663bb273
[#348] Add detailed descriptions for SSL_get_verify_result() errors. (#431)
* [#348] Add detailed descriptions for SSL_get_verify_result() errors.

* [#348] Fix formating in tls.c.
2022-03-30 17:10:16 +05:00
kirill reshke 8fcbabf518
Fix unnamed prepared statement polling (#416)
* Fix unnamed prepared statement polling

* Send on read signal if ssl readahead is not exhaused

* remote null byte from snprintf

Co-authored-by: Kirill Reshke <reshke@yandex-team.ru>
2022-02-14 21:37:45 +05:00
kirill reshke 252622bf71
PGOPTION for odyssey catchup timeout (#411)
* XPGOPTION for odyssey catchup timeout

* Fix opname_size

* Fix catchup timeout parsing
2022-02-09 12:14:54 +05:00
kirill reshke f9aacb2442
Fix describe portal: do not rewrite message in this case (#404)
* Fix describe portal: do not rewrite message in this case

* Remove conf changes
2022-01-20 12:26:16 +05:00
kirill reshke fade74703a
Reserve prep stmt (#397)
* Add typedef to enum declaration

* preserve prepared statement basics

* murmur hash impl

* Hash set and hash map

* Hash set and hash map

* Allow relay to rewrite packets

* Fixes

* tmp

* Fmt

* Rebase fixes

* Min working version

* Fix heap buffer overflow

* Add show server_prep_smtms command to console db

* Store prep stmts by body hash

* Fix deadlock in console show prep stmts

* Better discard

* CLeanup code

* Support for multiple override msgs

* Remove rewrite logic

* Config validation

* Fixes

* Fmt

* Deploy rewrited msgs only on sync state

* Fix memoty issues allocaltion

* Smart discard

* Fix asan

* Handle fronent close prepered statement msg

* Fix memory leak

* Fixes

* Tests

* Fix tests

* fix tests

* remove bin

* fix clang compiler warns

* Reduse matrix to 1 case, because it doesnt change anything, as tests runs inside docker
2022-01-18 14:08:15 +05:00
kirill reshke 0287a17ba5
Config override client pg options (#399)
* Alter route cmd

* Read override options from cnf

* Tests and fixs

* fixes

* Fix memory leak
2022-01-10 10:31:04 +05:00
kirill reshke d6652fb1a5
Log pg proto msgs in debug (#400)
* Log pg proto msgs in debug

* Drop kiwi_be_read_parse_dest function
2022-01-10 10:30:14 +05:00
kirill reshke 5041bddba6
Add more pg options to pass through (#398)
* Add more pg options to pass through

* fmt
2022-01-06 18:13:34 +05:00
kirill reshke 6fa3f94b6e
Improve pgoptions parsing & add more tests (#393) 2021-12-27 13:42:14 +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 d215160b3a
Fix compiler warnings (#386) 2021-12-09 16:34:04 +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
Heckad f4d6f4794b Add parse pgoptions and extract search_path 2021-07-07 11:32:38 +03:00
kirill reshke fe0e0ed20d
add makefile to machinarium repo (#322)
Co-authored-by: reshke <Kirill Reshke>
2021-05-20 10:56:55 +05:00
reshke 32977c3b80 apply fmt on machinarium 2021-05-14 16:31:29 +05:00
reshke 1d478f7d14 some more bench 2021-05-05 22:21:08 +05:00
reshke c95f0bce19 one more bench on mm 2021-04-30 20:11:50 +05:00
reshke 63f5b047d6 fix bench compile errors 2021-04-30 19:42:41 +05:00
reshke 94b4859df6 fallback to reuse client token to backend auth 2021-04-30 17:09:01 +05:00
reshke 74623edfb5 LDAP auth in od 2021-04-28 17:54:56 +05:00
reshke a7870abee0 fmt 2021-03-16 16:11:13 +05:00
Andrey Borodin d0c3238cc4 Preformat query for backward compatibility and fix some misplaces ) 2021-03-16 10:59:14 +05:00
Andrey Borodin 3706f0eb2d Fix some warnings 2021-03-05 10:45:22 +05:00
Andrey Borodin 4b90eb8971 Fix injection in auth_query 2021-03-05 09:42:45 +05:00
kirill reshke f0fee5feea
using limited channel in async log worker (#285)
* using limited channel in async log worker

* fmt

Co-authored-by: reshke <Kirill Reshke>
2021-03-01 17:01:04 +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
kirill reshke 919c5c188a
debian infrastructure better + cmake fixes (#258)
* change debian build version

* some cmake lists fixes

Co-authored-by: reshke <Kirill Reshke>
2021-01-11 15:32:56 +05:00
kirill reshke b071fd1633
do not find openssl package when it explicitly provided, also make use scram optional (#257)
Co-authored-by: reshke <Kirill Reshke>
2021-01-11 14:13:02 +05:00
reshke 0933d1ebb3 better 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
kirill reshke fb3ce93f56
fix one more compiler warning (#238)
Co-authored-by: reshke <Kirill Reshke>
2020-11-30 17:33:45 +05:00
kirill reshke 89ef383056
fix build (#237)
Co-authored-by: reshke <Kirill Reshke>
2020-11-27 23:03:42 +05:00
kirill reshke dd52fbd83e
compiler hints + just make world a better place & formatting things (#236) 2020-11-25 15:17:15 +05:00
Daniil Zakhlystov e6781e8a4e
Rename OD_ escaping to MM_ && fix indentation for cmakelists (#235) 2020-11-23 18:57:56 +05:00
Daniil Zakhlystov e97f7e1f1c
Add compression toggle to config, cmake && Add dependencies to BuildDebian (#234)
* Add compression option to config

* Add BUILD_COMPRESSION option to cmake

* Escape identifiers

* Add preprocessing directives for OD_BUILD_COMPRESSION

* Add dependencies for BuildDebian

* apply fmt

Co-authored-by: root <root@ubuntu-build-machine.ru-central1.internal>
2020-11-23 16:55:42 +05:00
kirill reshke 68c1b70025
change default compiler standart (#233)
Co-authored-by: reshke <Kirill Reshke>
2020-11-23 16:42:44 +05:00
kirill reshke 785e85ab6f
Fix leaks and improve locking in cron (#229)
Also fix some warnings.
2020-11-23 14:13:28 +05:00