Report a dropped queue entry as it happens, with the correlator and not the item (#47) - #298
Merged
Merged
Conversation
…ot the item (#47) 0047 says every drop at the bound is reported at the moment it happens, as an event through 0100, carrying the kind of action and the correlator for its target under 0071 rather than the identifier, and that the standing count is kept beside it for a client that was not listening. The count was here and the event was not. The enqueue makes the report itself, and this replaces handing the drop back for somebody else to make it. That shape left the record's "every drop" resting on every caller remembering, and a caller that ignores the answer produces exactly the silent discard 0047 exists against. The value is still handed back, because a caller may want to say something of its own about what was lost. At `failure` rather than `notice`, which is 0105's sentence about a dropped queue entry and its reason: a cache entry can be fetched again and a person's own action cannot, so a client filtering `notice` out would stop seeing the one thing this record exists to prevent being silent about. The target leaves as `for-target`, reduced, so the boundary turns it into 0071's correlator and the identifier reaches no sink. The kind leaves as `asserted-about`, carried whole, because it is one of a fixed set this module declares and two people running the same build cannot hold different values for it. Both are in `lifecycle::every_field_name_the_core_emits`, which is 0071's rule as data, and the suite refuses a name declared and not stated. The order the dropped entry stood in is on the value handed back and not on the event: 0047 names two things the report carries, and a counter meaningful only inside one queue is not one of them. Neither of #47's two conditions is met by this. Both restart the core and restore a server, and nothing in this tree does either. Signed-off-by: Nils Lehnen <30603423+iderex@users.noreply.github.com>
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.
The issue this belongs to
Belongs to #47. Neither of that issue's two conditions is met here, and the
reason is unchanged: both restart the core and restore a server, and nothing in
this tree does either. What this closes is the third item on that issue's own
list of what is not covered - nothing reports a drop as an event.
It touches four files two other issues own, and none could be separated from it.
src/playback/report.rsis #57's andsrc/session/mid_playback.rsis #35's,because the enqueue that makes the report is theirs to call.
src/lifecycle/mod.rsis #115's, because 0071's rule as data is gathered wherethe core is created and a field name declared and not stated is refused by the
suite.
tests/the_rule_as_data_names_every_field.rsis #71's, and it pins thewhole set a bundle would carry rather than a count, so a name arriving is a name
written into it.
What changed
A drop at the bound is reported through 0100 at the moment it happens, with the
kind of action and the correlator 0071 defines for the target.
The enqueue makes that report itself, and this replaces handing the drop back for
somebody else to make it. Handing it back left the record's "every drop" resting
on every caller remembering, and a caller that ignores the answer produces exactly
the silent discard 0047 exists against. The value is still handed back, because a
caller may want to say something of its own about what was lost.
At
failurerather thannotice. That is 0105's sentence about a dropped queueentry and its reason:
The target leaves as
for-target, reduced, so the diagnostics boundary turns itinto a correlator and the identifier reaches no sink. The kind leaves as
asserted-about, carried whole, because it is one of a fixed set this moduledeclares and two people running the same build against the same server cannot
hold different values for it, which is 0068's question and the one that first
treatment is for.
The order the dropped entry stood in is on the value handed back and not on the
event. 0047 names two things the report carries, and a counter meaningful only
inside one queue is not one of them.
Reporting::report,Reporting::observe,Reporting::report_after_a_renewalandthe enqueue itself take the facility, for the reason they already take a clock
reading: this module owns no facility of the client's and reaches for nothing.
What failure it prevents
The one 0047 opens with. A person marks something watched on a train, the queue
is full a month later, and the oldest thing they did is discarded to make room.
The count answers somebody who asks afterwards; the event is what reaches a client
that was listening, and without it a client can report that eleven things were
lost and never which kind or how they clustered.
The second failure is the one the shape prevents rather than the field. A drop
handed back as a return value is a drop reported only where a caller remembered,
and nothing here made remembering necessary: the enqueue carries no
#[must_use],and both callers in the tree pass its answer straight through to their own return
without reading it.
Neither failure has happened, because nothing here has a sink at that point yet,
and both are stated as what the record argues against rather than as an
incident.
Evidence
The commit being pushed:
The two commands
CONTRIBUTING.mdnames, run at it:Two cases are new in the module:
Four gate legs run by hand on this machine:
What a guard here refuses, and the proof it bites
Three violations, each watched failing. Every run is
cargo test --locked --lib server::write_queue, and the green run at the head is:a_drop_report_carries_a_correlator_and_never_the_identifierrefuses the itema person watched reaching a sink. The violation is one word at the declaration,
which is where 0071's treatment is chosen:
a_drop_is_reported_as_it_happens_with_the_kind_and_a_correlatorrefuses theseverity a client filters out:
Both of them together refuse the shape this change replaces, which is the drop
handed back and never reported:
The first case also asserts the negative half, that a queue under its bound
reports nothing, so the guard cannot be satisfied by a facility that emits on
every enqueue.
What this does not cover
The standing count is unchanged and was already here. This adds the event beside
it, and nothing about
WriteQueue::droppedmoved.No drop of any other kind is reported, because there is no other kind. 0105 gives
a second door - an entry whose envelope does not open - and that door needs bytes
in a store, which is #40 and #41 and is not built.
Nothing calls the enqueue with a sink attached. The two callers in the tree are
crate::playback::reportandcrate::session::mid_playback, and both are reachedonly from cases; the client surface that would hold a real facility is #115 and is
not built. So the event is proven against a collector here and has reached nobody.
The event's identity is this module's, which is where 0100 puts it, and no
document lists it. What derives the set of identities is nothing: there is no
EventName::all, by 0100's own decision that a central set would put everysubsystem's identities in one file. That is stated rather than fixed here.
Nothing measured anything.
The coverage leg and the thread detector were not run on this machine. The
verdicts on this pull request are theirs.
Who has read it
Nobody other than me. There was no second reader available, and the evidence
above stands in place of one.