Skip to content

Commit

Permalink
Revert protocol version upgrade (#7727)
Browse files Browse the repository at this point in the history
## Problem

"John pointed out that the switch to protocol version 2 made
test_gc_aggressive test flaky:
#7692.
I tracked it down, and that is indeed an issue. Conditions for hitting
the issue:
The problem occurs in the primary
GC horizon is set to a very low value, e.g. 0.
If the primary is actively writing WAL, and GC runs in the pageserver at
the same time that the primary sends a GetPage request, it's possible
that the GC advances the GC horizon past the GetPage request's LSN. I'm
working on a fix here: #7708."
- Heikki

## Summary of changes
Use protocol version 1 as default.
  • Loading branch information
VladLazar authored May 13, 2024
1 parent 5a0da93 commit bbe730d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pgxn/neon/libpagestore.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ char *neon_auth_token;
int readahead_buffer_size = 128;
int flush_every_n_requests = 8;

int neon_protocol_version = 2;
int neon_protocol_version = 1;

static int n_reconnect_attempts = 0;
static int max_reconnect_attempts = 60;
Expand Down Expand Up @@ -860,7 +860,7 @@ pg_init_libpagestore(void)
"Version of compute<->page server protocol",
NULL,
&neon_protocol_version,
2, /* use protocol version 2 */
1, /* default to old protocol for now */
1, /* min */
2, /* max */
PGC_SU_BACKEND,
Expand Down

1 comment on commit bbe730d

@github-actions
Copy link

Choose a reason for hiding this comment

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

3141 tests run: 2995 passed, 0 failed, 146 skipped (full report)


Code coverage* (full report)

  • functions: 31.4% (6329 of 20161 functions)
  • lines: 47.3% (47744 of 100969 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
bbe730d at 2024-05-13T14:14:10.464Z :recycle:

Please sign in to comment.