Lev Kokotov
9d84d6f131
Graceful shutdown and refactor ( #144 )
...
* Graceful shutdown and refactor
* ok
* _Graceful_ shutdown
* Remove hardcoded setting
* clean up
* end
* timeout
* hmm
* hmm!
* bash
* bash
* hmm
* maybe maybe
* Adds tests and move non-admin connection rejection to startup (#145 )
* Move error response
* Adds tests and removes unused variable
* Adds debug log
Co-authored-by: zainkabani <77307340+zainkabani@users.noreply.github.com >
2022-08-25 06:40:56 -07:00
Lev Kokotov
069d76029f
Fix incorrect routing for replicas ( #139 )
...
* Fix incorrect routing for replicas
* name
2022-08-21 22:40:49 -07:00
Mostafa Abdelraouf
5f5b5e2543
Random instance selection ( #136 )
...
* wip
* revert some'
* revert more
* poor-man's integration test
* remove test
* fmt
* --workspace
* fix build
* fix integration test
* another stab
* log
* run after integration
* cargo test after integration
* revert
* revert more
* Refactor + clean up
* more clean up
2022-08-21 22:15:20 -07:00
zainkabani
5948fef6cf
Minor Refactoring of re-used code and server stat reporting ( #129 )
...
* Minor changes to stats reporting and recduce re-used code
* fmt
2022-08-18 05:12:38 -07:00
Mostafa Abdelraouf
790898c20e
Add pool name and username to address object ( #128 )
...
* Add pool name and username to address object
* Fix address name
* fmt
2022-08-17 08:40:47 -07:00
Lev Kokotov
be254cedd9
Fix debug log ( #120 )
2022-08-11 22:47:47 -07:00
zainkabani
f963b12821
Health check delay ( #118 )
...
* initial commit of server check delay implementation
* fmt
* spelling
* Update name to last_healthcheck and some comments
* Moved server tested stat to after require_healthcheck check
* Make health check delay configurable
* Rename to last_activity
* Fix typo
* Add debug log for healthcheck
* Add address to debug log
2022-08-11 14:42:40 -07:00
Mostafa Abdelraouf
48cff1f955
Slightly more light weight health check ( #100 )
2022-07-29 11:58:25 -07:00
Mostafa Abdelraouf
2ae4b438e3
Add support for multi-database / multi-user pools ( #96 )
...
* Add support for multi-database / multi-user pools
* Nothing
* cargo fmt
* CI
* remove test users
* rename pool
* Update tests to use admin user/pass
* more fixes
* Revert bad change
* Use PGDATABASE env var
* send server info in case of admin
2022-07-27 19:47:55 -07:00
Lev Kokotov
b93303eb83
Live reloading entire config and bug fixes ( #84 )
...
* Support reloading the entire config (including sharding logic) without restart.
* Fix bug incorrectly handing error reporting when the shard is set incorrectly via SET SHARD TO command.
selected wrong shard and the connection keep reporting fatal #80 .
* Fix total_received and avg_recv admin database statistics.
* Enabling the query parser by default.
* More tests.
2022-06-24 14:52:38 -07:00
Lev Kokotov
fe32b5ef17
Reduce traffic on the stats channel ( #69 )
2022-05-17 13:05:25 -07:00
Lev Kokotov
54699222f8
Possible fix for clients waiting stat leak ( #68 )
2022-05-14 21:35:33 -07:00
Lev Kokotov
df85139281
Update README. Comments. Version bump. ( #60 )
...
* update readme
* comments
* just a version bump
2022-03-10 01:33:29 -08:00
Lev Kokotov
341ebf4123
docs and remove Option ( #58 )
...
* docs and remove Option
* lint
2022-03-07 23:05:40 -08:00
Lev Kokotov
35828a0a8c
Per-shard statistics ( #57 )
...
* per shard stats
* aight
* cleaner
* fix show lists
* comments
* more friendly
* case-insensitive
* test all shards
* ok
* HUH?
2022-03-04 17:04:27 -08:00
Lev Kokotov
d4186b7815
More admin ( #53 )
...
* more admin
* more admin
* show lists
* tests
2022-03-01 22:49:43 -08:00
Lev Kokotov
aaeef69d59
Refactor admin ( #52 )
2022-03-01 08:47:19 -08:00
Lev Kokotov
b21e0f4a7e
admin SHOW DATABASES ( #51 )
...
* admin SHOW DATABASES
* test
* correct replica count
2022-02-28 17:22:28 -08:00
Lev Kokotov
99d65fc475
Check server versions on startup & refactor ( #48 )
...
* Refactor and check server parameters
* warnings
* fix validator
2022-02-26 11:01:52 -08:00
Lev Kokotov
5972b6fa52
Switch to parking_lot RwLock & Mutex. Use trace! for protocol instead of debug! ( #42 )
...
* RwLock & parking_lot::Mutex
* upgrade to trace
2022-02-24 08:44:41 -08:00
Lev Kokotov
f21a3d8d8c
Add server login stat; refactor for better naming ( #34 )
2022-02-21 17:28:50 -08:00
Lev Kokotov
86941d62e4
Reset query router setting to default ( #32 )
2022-02-21 00:00:50 -08:00
Lev Kokotov
44b5e7eeee
use logger lib; minor refactor; sv_* stats ( #29 )
2022-02-20 22:47:08 -08:00
Lev Kokotov
3b795464a8
Fix client states reporting ( #27 )
...
* Fix client states reporting
* clean
2022-02-20 12:40:09 -08:00
Lev Kokotov
d4c1fc87ee
Reloadable config ( #26 )
...
* Reloadable config
* readme
* live config reload
* test matrix
2022-02-19 13:57:35 -08:00
Lev Kokotov
aa796289bf
Query parser 3.0 ( #23 )
...
* Starting query parsing
* Query parser
* working config
* disable by default
* fix tsets
* introducing log crate; test for query router; comments
* typo
* fixes for banning
* added test for prepared stmt
2022-02-18 07:10:18 -08:00
Lev Kokotov
4c8a3987fe
Refactor query routing into its own module ( #22 )
...
* Refactor query routing into its own module
* commments; tests; dead code
* error message
* safer startup
* hm
* dont have to be public
* wow
* fix ci
* ok
* nl
* no more silent errors
2022-02-16 22:52:11 -08:00
Lev Kokotov
7b0ceefb96
Constants, comments, CI fixes, dead code clean-up ( #21 )
...
* constants
* server.rs docs
* client.rs comments
* dead code; comments
* comment
* query cancellation comments
* remove unnecessary cast
* move db setup up one step
* query cancellation test
* new line; good night
2022-02-15 22:45:45 -08:00
Lev Kokotov
05b4cccb97
More statistics ( #20 )
...
* cleaner stats
* remove shard selection there
2022-02-15 08:18:01 -08:00
Lev Kokotov
8e5e28a139
Some stats ( #19 )
2022-02-14 10:00:55 -08:00
Lev Kokotov
20ceb729a0
print session duration; connect to all servers when validating ( #11 )
2022-02-12 09:24:24 -08:00
Lev Kokotov
526b9eb666
Pass real server info to the client ( #10 )
2022-02-11 22:19:49 -08:00
Lev Kokotov
0d369ab90a
add default server role; bug fix
2022-02-11 11:19:40 -08:00
Lev Kokotov
495d6ce6c3
fmt
2022-02-10 10:38:06 -08:00
Lev Kokotov
883b6ee793
todo complete
2022-02-10 10:37:55 -08:00
Lev Kokotov
22c6f13dc7
removed atomic round-robin
2022-02-10 10:37:49 -08:00
Lev Kokotov
8209633e05
pool fixes
2022-02-10 08:54:06 -08:00
Lev Kokotov
a9b2a41a9b
fixes to the banlist
2022-02-09 21:19:14 -08:00
Lev Kokotov
28c70d47b6
#1 Primary/replica selection
2022-02-09 20:02:20 -08:00
Lev Kokotov
4c16ba3848
some comments
2022-02-09 06:51:31 -08:00
Lev Kokotov
edf6a69ca4
warnings
2022-02-08 17:08:17 -08:00
Lev Kokotov
95c2d593cc
health check timeout config
2022-02-08 16:56:29 -08:00
Lev Kokotov
9657256adf
fixed health check; sharding setup and tests
2022-02-08 15:48:28 -08:00
Lev Kokotov
b2c7d6bdab
ban time
2022-02-08 09:28:53 -08:00
Lev Kokotov
c27a7d30dc
config support; started more sharding
2022-02-08 09:25:59 -08:00
Lev Kokotov
290015957b
nuance
2022-02-06 12:52:59 -08:00
Lev Kokotov
99d3e0b803
fix banlist
2022-02-06 11:13:12 -08:00
Lev Kokotov
b943ff3fa6
sharding
2022-02-05 19:43:48 -08:00
Lev Kokotov
e0ca175129
correct load balancing
2022-02-05 18:20:53 -08:00
Lev Kokotov
de800b8a10
comments
2022-02-05 13:25:03 -08:00