-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into add_groups
- Loading branch information
Showing
54 changed files
with
1,576 additions
and
613 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,5 +28,4 @@ PGPASSWORD=passwd psql -h localhost -p 6432 -U auth_query_user_md5 -c "SELECT 1" | |
exit 1 | ||
} | ||
|
||
|
||
ody-stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
pid_file "/tmp/odyssey.pid" | ||
daemonize yes | ||
|
||
unix_socket_dir "/tmp" | ||
unix_socket_mode "0644" | ||
|
||
log_format "%p %t %l [%i %s] (%c) %m\n" | ||
|
||
log_to_stdout no | ||
|
||
log_syslog no | ||
log_syslog_ident "odyssey" | ||
log_syslog_facility "daemon" | ||
|
||
log_file "/var/log/odyssey.log" | ||
log_debug no | ||
log_config yes | ||
log_session yes | ||
log_query no | ||
log_stats yes | ||
stats_interval 60 | ||
log_general_stats_prom yes | ||
log_route_stats_prom no | ||
promhttp_server_port 7777 | ||
|
||
workers "auto" | ||
resolvers 1 | ||
|
||
readahead 8192 | ||
|
||
cache_coroutine 0 | ||
|
||
coroutine_stack_size 16 | ||
|
||
nodelay yes | ||
|
||
keepalive 15 | ||
keepalive_keep_interval 75 | ||
keepalive_probes 9 | ||
|
||
keepalive_usr_timeout 0 | ||
|
||
listen { | ||
host "*" | ||
port 6432 | ||
backlog 128 | ||
compression yes | ||
tls "disable" | ||
} | ||
|
||
|
||
storage "postgres_server" { | ||
type "remote" | ||
host "[localhost]:5432,localhost" | ||
port 5550 | ||
} | ||
|
||
database "db" { | ||
user "postgres" { | ||
authentication "none" | ||
storage "postgres_server" | ||
pool "transaction" | ||
pool_discard no | ||
pool_reserve_prepared_statement yes | ||
client_fwd_error yes | ||
} | ||
} | ||
|
||
storage "local" { | ||
type "local" | ||
} | ||
|
||
database "console" { | ||
user default { | ||
authentication "none" | ||
role "admin" | ||
pool "session" | ||
storage "local" | ||
} | ||
} | ||
|
||
|
||
locks_dir "/tmp/odyssey" | ||
|
||
graceful_die_on_errors yes | ||
enable_online_restart no | ||
bindwith_reuseport yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash -x | ||
|
||
set -ex | ||
|
||
test_successful() { | ||
(for i in {1..1000}; do | ||
echo "run_id_${i},task_id_${i},Some random ${i}th text"; | ||
done | psql postgresql://postgres@localhost:6432/db -c "COPY copy_test FROM STDIN (FORMAT csv);";) > /dev/null 2>&1 || { | ||
echo 1 | ||
return | ||
} | ||
echo 0 | ||
} | ||
|
||
/usr/bin/odyssey /copy/config.conf | ||
with_pstmts_test_successful=$(test_successful) | ||
ody-stop | ||
|
||
sed -i '/pool_reserve_prepared_statement yes/d' /copy/config.conf | ||
|
||
/usr/bin/odyssey /copy/config.conf | ||
without_pstmts_test_successful=$(test_successful) | ||
ody-stop | ||
|
||
if [ $with_pstmts_test_successful -eq 1 -a $without_pstmts_test_successful -eq 0 ]; then { | ||
echo "ERROR: copy bug when pool_reserve_prepared_statement setting to yes" | ||
|
||
cat /var/log/odyssey.log | ||
echo " | ||
" | ||
cat /var/log/postgresql/postgresql-14-main.log | ||
|
||
exit 1 | ||
} fi | ||
|
||
if [ $with_pstmts_test_successful -eq 1 -o $without_pstmts_test_successful -eq 1 ]; then { | ||
echo "ERROR: copy bug" | ||
|
||
cat /var/log/odyssey.log | ||
echo " | ||
" | ||
cat /var/log/postgresql/postgresql-14-main.log | ||
|
||
exit 1 | ||
} fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
git clone https://github.com/pg-sharding/gorm-spqr.git /gorm/gorm-spqr | ||
docker build -t gorm-tests /gorm/gorm-spqr | ||
rm -rf /gorm/gorm-spqr | ||
docker run -e DB_HOST='odyssey' -e DB_PORT=6432 -e DB_USER='spqr-console' -e DB_NAME='spqr-console' -e EXTRA_PARAMS='client_encoding=UTF8' --network=odyssey_od_net gorm-tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.