Skip to content

Commit

Permalink
fixup(#7204 / postgres): revert IsPrimaryAlive checks (#7209)
Browse files Browse the repository at this point in the history
Fix #7204.

neondatabase/postgres#400
neondatabase/postgres#401
neondatabase/postgres#402

These commits never go into prod. Detailed investigation will be posted
in another issue. Reverting the commits so that things can keep running
in prod. This pull request adds the test to start two replicas. It fails
on the current main #7210 but
passes in this pull request.

---------

Signed-off-by: Alex Chi Z <[email protected]>
  • Loading branch information
skyzh authored Mar 23, 2024
1 parent 35f4c04 commit 643683f
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 6 deletions.
18 changes: 18 additions & 0 deletions test_runner/regress/test_hot_standby.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,21 @@ def test_hot_standby(neon_simple_env: NeonEnv):
# clean up
if slow_down_send:
sk_http.configure_failpoints(("sk-send-wal-replica-sleep", "off"))


def test_2_replicas_start(neon_simple_env: NeonEnv):
env = neon_simple_env

with env.endpoints.create_start(
branch_name="main",
endpoint_id="primary",
) as primary:
time.sleep(1)
with env.endpoints.new_replica_start(
origin=primary, endpoint_id="secondary1"
) as secondary1:
with env.endpoints.new_replica_start(
origin=primary, endpoint_id="secondary2"
) as secondary2:
wait_replica_caughtup(primary, secondary1)
wait_replica_caughtup(primary, secondary2)
2 changes: 2 additions & 0 deletions test_runner/regress/test_replication_start.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import pytest
from fixtures.log_helper import log
from fixtures.neon_fixtures import NeonEnv, wait_replica_caughtup


@pytest.mark.xfail
def test_replication_start(neon_simple_env: NeonEnv):
env = neon_simple_env

Expand Down
2 changes: 1 addition & 1 deletion vendor/postgres-v14
2 changes: 1 addition & 1 deletion vendor/postgres-v15
2 changes: 1 addition & 1 deletion vendor/postgres-v16
6 changes: 3 additions & 3 deletions vendor/revisions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"postgres-v16": "111e82c45d79728fdd3a4816605378c3cc5cfe84",
"postgres-v15": "af9ab67bc80afd94e4eb11c34f50c0a29c37eb1b",
"postgres-v14": "c5d920a7d9e9cbeb62b6c46f292db08162763f68"
"postgres-v16": "3946b2e2ea71d07af092099cb5bcae76a69b90d6",
"postgres-v15": "e7651e79c0c27fbddc3c724f5b9553222c28e395",
"postgres-v14": "748643b4683e9fe3b105011a6ba8a687d032cd65"
}

1 comment on commit 643683f

@github-actions
Copy link

Choose a reason for hiding this comment

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

2798 tests run: 2650 passed, 1 failed, 147 skipped (full report)


Failures on Postgres 14

  • test_bulk_insert[neon-github-actions-selfhosted]: release
# Run all failed tests locally:
scripts/pytest -vv -n $(nproc) -k "test_bulk_insert[neon-release-pg14-github-actions-selfhosted]"
Flaky tests (2)

Postgres 16

  • test_vm_bit_clear_on_heap_lock: debug

Postgres 15

  • test_vm_bit_clear_on_heap_lock: debug

Code coverage* (full report)

  • functions: 28.1% (6280 of 22336 functions)
  • lines: 46.9% (44138 of 94137 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
643683f at 2024-03-23T02:14:58.172Z :recycle:

Please sign in to comment.