Skip to content

[dbsp] Fix flaky exchange wire-protocol tests under random fault injection - #6808

Merged
blp merged 1 commit into
mainfrom
fix-exchange-fault-injection-flake
Aug 5, 2026
Merged

[dbsp] Fix flaky exchange wire-protocol tests under random fault injection#6808
blp merged 1 commit into
mainfrom
fix-exchange-fault-injection-flake

Conversation

@blp

@blp blp commented Aug 5, 2026

Copy link
Copy Markdown
Member

new_message_sent_without_waiting_after_a_ping and
pings_repeatedly_without_retransmitting drive the wire protocol directly against a single hand-accepted TcpStream, so they can't tolerate the random inject_fault() connection drops meant for the round-based resilience tests: a dropped connection makes the client reconnect to a fresh socket the test never accepts, leaving it reading a dead stream and panicking on an unexpected None.

This fixes the problem by disabling fault injection while the tests that can tolerate it run. These tests run quickly, so other tests can still benefit from fault injection.

Describe Manual Test Plan

Ran the tests

Checklist

  • Unit tests added/updated
  • Integration tests added/updated
  • Documentation updated
  • Changelog updated

…ction

new_message_sent_without_waiting_after_a_ping and
pings_repeatedly_without_retransmitting drive the wire protocol directly
against a single hand-accepted TcpStream, so they can't tolerate the
random inject_fault() connection drops meant for the round-based
resilience tests: a dropped connection makes the client reconnect to a
fresh socket the test never accepts, leaving it reading a dead stream
and panicking on an unexpected None.

This fixes the problem by disabling fault injection while the tests that
can tolerate it run.  These tests run quickly, so other tests can still
benefit from fault injection.

Signed-off-by: Ben Pfaff <blp@feldera.com>
@blp
blp requested a review from mihaibudiu August 5, 2026 16:26
@blp blp self-assigned this Aug 5, 2026
@blp blp added bug Something isn't working DBSP core Related to the core DBSP library CI/CD rust Pull requests that update Rust code enterprise Issue related to Feldera Enterprise features. multihost Related to multihost or distributed pipelines labels Aug 5, 2026
@blp
blp added this pull request to the merge queue Aug 5, 2026

@mythical-fred mythical-fred left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Correct fix: the two protocol-level tests drive a hand-accepted TcpStream and have no way to recover from a inject_fault() disconnect. A refcounted FAULT_INJECTION_DISABLE_COUNT toggled by an RAII FaultInjectionDisabled guard is exactly the right shape — nests safely, unwinds cleanly on panic, and leaves the round-based resilience tests unchanged.

The scoping is tight (two tests, both fast, both explicitly commented as protocol-level) so fault injection still covers the tests it was designed for.

Merged via the queue into main with commit 2d4d35f Aug 5, 2026
1 check passed
@blp
blp deleted the fix-exchange-fault-injection-flake branch August 5, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working CI/CD DBSP core Related to the core DBSP library enterprise Issue related to Feldera Enterprise features. multihost Related to multihost or distributed pipelines rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants