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

[DEPRECATED][BUGFIX] Move sleep to implement a 1s delay between pings for schema lock connection #1853

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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
8 changes: 4 additions & 4 deletions core/node/storage/pg_stream_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,10 @@ func (s *PostgresStreamStore) maintainSchemaLock(
LogError(dlog.FromCtx(ctx))
s.exitSignal <- err
}

if err = SleepWithContext(ctx, 1*time.Second); err != nil {
return
}
}
// Wait 1s between db pings.
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment is incorrect? But anyway it's redundant: it's pretty obvious from the code that this is sleep between pings.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll take the comment out. In the meantime this PR is in a weird state because I'm trying to solicit more info about how the race condition bug is occurring and so it's regressing away from it's final state until I fix the issue causing the test flake.

if err = SleepWithContext(ctx, 1*time.Second); err != nil {
return
}
}
}
Expand Down
Loading