Skip to content

Conversation

@petrosagg
Copy link
Contributor

The test's intention was to spawn a reader of the replication and ensure that Materialize can successfully reclaim it by killing the appropriate server process.

However, the WAL reader that we spawned also advanced the slot forward without Materialize having seen and committed that section. To avoid this we pass an extremely long fsync-interval parameter that will result in the slot being busy but not advanced.

Fixes MaterializeInc/database-issues#8447

Motivation

Tips for reviewer

Checklist

  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.

The test's intention was to spawn a reader of the replication and ensure
that Materialize can successfully reclaim it by killing the appropriate
server process.

However, the WAL reader that we spawned also advanced the slot forward
without Materialize having seen and committed that section. To avoid
this we pass an extremely long fsync-interval parameter that will result
in the slot being busy but not advanced.

Fixes MaterializeInc/database-issues#8447

Signed-off-by: Petros Angelatos <[email protected]>
Copy link
Contributor

@martykulma martykulma left a comment

Choose a reason for hiding this comment

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

Nice, thanks @petrosagg !!

Was there a reason you selected a specific value here instead of 0 (disables fsync)?

@petrosagg
Copy link
Contributor Author

Was there a reason you selected a specific value here instead of 0 (disables fsync)?

Yes, if you set fsync_interval to zero then this if branch is always taken and OutputFsync updates output_fsync_lsn unconditionally, which then causes feedback messages to advance the slot.

@petrosagg petrosagg merged commit 42c0ae7 into MaterializeInc:main Dec 2, 2025
13 checks passed
@petrosagg petrosagg deleted the issue-8447 branch December 2, 2025 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants