Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(derive): [Holocene] Drain previous channel in one iteration #583

Merged
merged 5 commits into from
Sep 30, 2024

Conversation

clabby
Copy link
Collaborator

@clabby clabby commented Sep 28, 2024

Overview

Drains the entire previous channel at one time, rather than over multiple iterations, if the following case is met:

If a first frame is decoded while the previous frame isn't a last frame (i.e., is_last is false), all previous frames for the same channel are dropped and this new first frame remains in the queue.

Also fixes a small issue w/ the DERIVED_FRAMES_COUNT metric's accounting, where it was counting dropped frames.

Tests

Added a new test for this functionality, when there is a valid, closed channel earlier on in the frame queue @ test_holocene_replace_channel.

Copy link
Collaborator Author

clabby commented Sep 28, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @clabby and the rest of your teammates on Graphite Graphite

@clabby clabby self-assigned this Sep 28, 2024
@clabby clabby added A-derive Area: kona-derive crate K-fix Kind: fix labels Sep 28, 2024
Copy link

codecov bot commented Sep 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.3%. Comparing base (d5e7038) to head (f826bfd).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@clabby clabby changed the title fix(derive): Holocene channel replacement chore(derive): [Holocene] Drain previous channel in one iteration Sep 28, 2024
@clabby clabby added the H-holocene Hardfork: Holocene related label Sep 28, 2024
Copy link
Collaborator

@refcell refcell left a comment

Choose a reason for hiding this comment

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

The logic makes sense to me and I like the short variable rename to prev_frame and next_frame - much clearer.

I would like to verify that it passes tests that cover the sad path ruleset where frames with differing channels are interleaved in #585.

Maybe we can merge #585 and then rebase this on-top?

@refcell refcell added this pull request to the merge queue Sep 30, 2024
Merged via the queue into main with commit 3b5499c Sep 30, 2024
18 checks passed
This was referenced Sep 30, 2024
@github-actions github-actions bot mentioned this pull request Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-derive Area: kona-derive crate H-holocene Hardfork: Holocene related K-fix Kind: fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants