Skip to content

rpc: set a minimum long-polling interval for Events - #8050

Merged
creachadair merged 2 commits into
masterfrom
mjf/pollways
Mar 2, 2022
Merged

creachadair merged 2 commits into
masterfrom
mjf/pollways

Conversation

@creachadair

Copy link
Copy Markdown

Since the goal of reading events at the head of the event log is to satisfy a
subscription style interface, there is no point in allowing head polling with
no wait interval. The pagination case already bypasses long polling, so the
extra option is unneessary.

Set a minimum default long-polling interval for the head case.

@tychoish tychoish left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should we write a test for the minim time behavior?

M. J. Fromberger added 2 commits March 2, 2022 07:33
Since the goal of reading events at the head of the event log is to satisfy a
subscription style interface, there is no point in allowing head polling with
no wait interval. The pagination case already bypasses long polling, so the
extra option is unneessary.

Set a minimum default long-polling interval for the head case.
@creachadair

Copy link
Copy Markdown
Author

should we write a test for the minim time behavior?

Good idea, done.

@creachadair
creachadair merged commit af96ef2 into master Mar 2, 2022
@creachadair
creachadair deleted the mjf/pollways branch March 2, 2022 16:12
maxItems = 100
}

const minWaitTime = 1 * time.Second

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a reason these minimum/maximum wait times are not documented for this function?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

They're an implementation detail, and clients should not be written assuming specific values for them. The service is allowed to change them at will.

mmsqe pushed a commit to mmsqe/tendermint that referenced this pull request Sep 2, 2022
Since the goal of reading events at the head of the event log is to satisfy a
subscription style interface, there is no point in allowing head polling with
no wait interval. The pagination case already bypasses long polling, so the
extra option is unneessary.

Set a minimum default long-polling interval for the head case.
Add a test for minimum delay.
mmsqe pushed a commit to mmsqe/tendermint that referenced this pull request Sep 2, 2022
Since the goal of reading events at the head of the event log is to satisfy a
subscription style interface, there is no point in allowing head polling with
no wait interval. The pagination case already bypasses long polling, so the
extra option is unneessary.

Set a minimum default long-polling interval for the head case.
Add a test for minimum delay.
mmsqe pushed a commit to mmsqe/tendermint that referenced this pull request Nov 26, 2022
Since the goal of reading events at the head of the event log is to satisfy a
subscription style interface, there is no point in allowing head polling with
no wait interval. The pagination case already bypasses long polling, so the
extra option is unneessary.

Set a minimum default long-polling interval for the head case.
Add a test for minimum delay.
thanethomson pushed a commit that referenced this pull request Dec 7, 2022
… (#9768)

* rpc: set a minimum long-polling interval for Events (#8050)

Since the goal of reading events at the head of the event log is to satisfy a
subscription style interface, there is no point in allowing head polling with
no wait interval. The pagination case already bypasses long polling, so the
extra option is unneessary.

Set a minimum default long-polling interval for the head case.
Add a test for minimum delay.

* fix doc

Co-authored-by: M. J. Fromberger <[email protected]>
mmsqe added a commit to mmsqe/tendermint that referenced this pull request Dec 9, 2022
…ermint#8050) (tendermint#9768)

* rpc: set a minimum long-polling interval for Events (tendermint#8050)

Since the goal of reading events at the head of the event log is to satisfy a
subscription style interface, there is no point in allowing head polling with
no wait interval. The pagination case already bypasses long polling, so the
extra option is unneessary.

Set a minimum default long-polling interval for the head case.
Add a test for minimum delay.

* fix doc

Co-authored-by: M. J. Fromberger <[email protected]>
mmsqe added a commit to mmsqe/tendermint that referenced this pull request Dec 9, 2022
…ermint#8050) (tendermint#9768)

* rpc: set a minimum long-polling interval for Events (tendermint#8050)

Since the goal of reading events at the head of the event log is to satisfy a
subscription style interface, there is no point in allowing head polling with
no wait interval. The pagination case already bypasses long polling, so the
extra option is unneessary.

Set a minimum default long-polling interval for the head case.
Add a test for minimum delay.

* fix doc

Co-authored-by: M. J. Fromberger <[email protected]>
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.

4 participants