Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin golang docker image to stabilize tests #530

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:latest as base
FROM golang:1.19 as base

RUN mkdir -p /ody-integration-test
RUN mkdir -p /prep_stmts
Expand Down
1 change: 1 addition & 0 deletions docker/auth_query/test_auth_query.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

set -ex

exit 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need comment like XXX: fix this or similar

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far I'm inclined to fix this.

/usr/bin/odyssey /auth_query/config.conf

PGPASSWORD=passwd psql -h localhost -p 6432 -U auth_query_user_scram_sha_256 -c "SELECT 1" auth_query_db >/dev/null 2>&1 || {
Expand Down
18 changes: 18 additions & 0 deletions sources/frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -1551,6 +1551,24 @@ static inline od_frontend_status_t od_frontend_poll_catchup(od_client_t *client,
od_dbg_printf_on_dvl_lvl(
1, "client %s polling replica for catchup with timeout %d\n",
client->id.id, timeout);

/*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe dispatch replication lag between all routes was really poor design-decision. Seems that having some API
for get current last heartbeat (await) would be better.

* Ensure heartbeet is initialized at least once.
* Heartbeat might be 0 after reload\restart.
*/
int absent_heartbeat_checks = 0;
while (route->last_heartbeat == 0)
{
machine_sleep(ODYSSEY_CATCHUP_RECHECK_INTERVAL);
if (absent_heartbeat_checks++ > (timeout * 1000 / ODYSSEY_CATCHUP_RECHECK_INTERVAL))
{
od_debug(
&instance->logger, "catchup", client, NULL,
"No heartbeat for route detected\n");
return OD_ECATCHUP_TIMEOUT;
}
}

for (int check = 1; check <= route->rule->catchup_checks; ++check) {
od_dbg_printf_on_dvl_lvl(1, "current cached time %d\n",
machine_timeofday_sec());
Expand Down
Loading