Skip to content

test(io): add test_so_reuseport_zero_downtime_handover#4715

Open
mkleczek wants to merge 1 commit intoPostgREST:mainfrom
mkleczek:test_so_reuseport_zero_downtime_handover
Open

test(io): add test_so_reuseport_zero_downtime_handover#4715
mkleczek wants to merge 1 commit intoPostgREST:mainfrom
mkleczek:test_so_reuseport_zero_downtime_handover

Conversation

@mkleczek
Copy link
Collaborator

DISCLAIMER:
This commit was authored entirely by a human without the assistance of LLMs.

Test validating zero-downtime deployments with SO_REUSEPORT. Marked as xfail to make sure it fails.

Prerequisite of: #4703

@mkleczek mkleczek force-pushed the test_so_reuseport_zero_downtime_handover branch from 3599134 to f7e84bd Compare March 12, 2026 15:25
@mkleczek mkleczek force-pushed the test_so_reuseport_zero_downtime_handover branch 2 times, most recently from 1427790 to 2274d2f Compare March 12, 2026 20:32
@mkleczek mkleczek force-pushed the test_so_reuseport_zero_downtime_handover branch from 2274d2f to cdfbff3 Compare March 12, 2026 22:18
Comment on lines +152 to +159
# 1. Start first PostgREST instance
# 2. Start a "client" thread issuing requests in a loop
# remembering all received errors
# 3. Start second PostgREST instance on the same port as the first one
# 4. Wait a little and terminate the first instance
# 5. Stop client thread
# 6. Stop second PostgREST instance
# 7. Verify client did not get any errors
Copy link
Member

Choose a reason for hiding this comment

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

Thanks, this is better. I'm not sure if I understand this part though:

  1. Start second PostgREST instance on the same port as the first one
  2. Wait a little and terminate the first instance
  3. Stop client thread

During this time, the client thread is expected to hit the endpoints of the 2nd instance and succeed?
So between step 4 and 5 the second instance takes over and starts serving over the same port?

If that's the case, having that as a comment would be clarifying.


  1. Start second PostgREST instance on the same port as the first one

Also I guess now the above fails immediately since the port is taken?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants