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

bug(audit): Does not end audit period and emit when source completes #5730

Closed
benlesh opened this issue Sep 15, 2020 · 1 comment
Closed
Labels
bug Confirmed bug

Comments

@benlesh
Copy link
Member

benlesh commented Sep 15, 2020

I would expect that with audit, if the source closes before the duration ends, we'd get the last value it captured. For whatever reason we decided not to do that ages ago, and I can't imagine why.

When the source completes, I think it should either:

  1. If it has seen a value, wait for the duration to end, then emit the value and complete the result.

OR

  1. Immediately emit the last value it saw (if any), then complete the result.

I'm inclined to say #1 makes the most sense. It's also the behavior of throttle.

@benlesh benlesh added AGENDA ITEM Flagged for discussion at core team meetings bug Confirmed bug and removed AGENDA ITEM Flagged for discussion at core team meetings labels Sep 15, 2020
@alexsherekin
Copy link
Contributor

  1. If it has seen a value, wait for the duration to end, then emit the value and complete the result.

This would mean, that we never emit and never complete if the duration is never or just neither emits nor completes. Is it the desired behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug
Projects
None yet
Development

No branches or pull requests

2 participants