Skip to content

Don't accept commits while clean in progress - #184

Open
jacomago wants to merge 6 commits into
ChannelFinder:masterfrom
jacomago:clean-lock
Open

jacomago wants to merge 6 commits into
ChannelFinder:masterfrom
jacomago:clean-lock

Conversation

@jacomago

@jacomago jacomago commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Attempt at fixing that the clean was happening in the background of commits going on, leading to a race between setting a channel status to inactive for the clean and active for the commits.

Also some refactoring of processor by taking advantage of adding some helper methods to the cf/model, because... I like refactoring :)

Create the adapter when the processor is constructed and always register required properties when the service starts, including with an injected test client.
Gate transactions on startup cleanup while keeping cancellation local to each transaction. Track startup commit waiters so shutdown can cancel them without cancelling the cleanup worker.

Wait for startup and active commit workers before stop-time cleanup, reject commits after stopping, and prevent restart until shutdown completes.

Include deterministic regression tests for ordering, cancellation, failures, and repeated service starts.
Move cleanup coverage into a dedicated module and exercise receiver isolation, empty results, query batches, transient failures, capped backoff, and bounded shutdown retries.
@jacomago
jacomago force-pushed the clean-lock branch 3 times, most recently from 40f4423 to e688923 Compare October 12, 2026 06:27
Add property_value() for canonical and custom property names, and has_property() for name-only checks or exact CFProperty matches.

Cover enum and string names, missing properties, empty and None values, exact matches, and first-match lookup semantics.
Add CFChannel.property() for canonical and custom names. Reuse it for value and name-existence lookups while preserving exact-property matching.
@jacomago
jacomago force-pushed the clean-lock branch 2 times, most recently from 4350986 to 6b1a649 Compare October 12, 2026 08:45
Keep the IOC running across a hard receiver restart. Require fresh
timestamps on every live channel and verify that a seeded stale channel
becomes Inactive.

Use the shared adapter fixture and typed status properties, and restore
the receiver if the test leaves it stopped.
@sonarqubecloud

Copy link
Copy Markdown

@jacomago
jacomago marked this pull request as ready for review October 12, 2026 13:51
@jacomago jacomago self-assigned this Oct 12, 2026
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.

1 participant