Repository navigation
Conversation
Related to rails#97. Preserve default batching while offering caller-visible write errors without automatic retry.
Author
|
The one red matrix job appears to be a runner service-startup failure, before checkout or tests, rather than a test failure: Tests (postgres, rails_main, 3.3) failed in Initialize containers, starting the workflow's MySQL service: Checkout, dependency installation, database setup and tests were all skipped. The other 35 test matrix jobs and lint passed at Could a maintainer please rerun the failed job? I tried the job rerun endpoint, but GitHub returned HTTP 403 (repository admin rights required). I have not changed code or pushed an empty commit to trigger another full matrix. |
Collaborator
|
A fix for this is on main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposal — feedback welcome
Related to #97. This draft proposes an opt-in synchronous write mode rather than changing the default batching behavior or introducing automatic retries.
The problem is a changed acknowledgement boundary: the batched writer returns to
broadcast's caller before inserting, so an insert failure can only be reported later; the failed batch is discarded. Some applications may prefer the pre-batching trade-off of paying write latency in the broadcasting thread and receiving insertion errors directly.Scope
writer_async: falsein Cable configuration.This is an alternative policy applications can choose, not a claim to repair every failed asynchronous batch. In particular it does not solve ambiguous database commit outcomes.
Review request
Would maintainers prefer this explicit opt-out, documentation-only clarification of the current contract, or a separately specified retry policy? Marked draft to keep that design choice visible.
Tests and provenance
New coverage checks configuration defaults/selection, caller-thread insertion, error propagation without retry, encrypted storage, asynchronous proportional trimming, trimming error isolation, and shutdown behavior.
Final local suite: 51 tests, 140 assertions, zero failures/errors/skips. Changed-file RuboCop: six applicable files, no offenses.
git diff --checkpasses. The separate observation test published in #97 was run successfully and is not included in this patch.Implementation and tests prepared with an OpenAI GPT-6.1 Sol helper, then reviewed and tested by Mira. No deployment or downstream dependency update is included.
Local verification uses Ruby 4.0.6, Rails 8.1.4 and SQLite. The PostgreSQL/MySQL and wider Rails/Ruby matrix remain for upstream CI; no claim that they passed locally.