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

fix(casting): properly follow an unpopulated node #8604

Merged
merged 2 commits into from
Dec 4, 2023
Merged

Conversation

michaelfig
Copy link
Member

closes: #8601

Description

If the multistore entry being followed was not yet created, the @agoric/casting follower would fixate on the current block height, and not try advancing the cursor to the latest entry. This fix keeps trying the latest entry to see if it has any new contents.

Also add follow error handling to agoric follow.

Security Considerations

n/a

Scaling Considerations

n/a

Documentation Considerations

n/a

Testing Considerations

Manually tested in UIs.

Upgrade Considerations

n/a

@michaelfig michaelfig added the agoric-cli package: agoric-cli label Dec 4, 2023
@michaelfig michaelfig self-assigned this Dec 4, 2023
@michaelfig michaelfig added the automerge:no-update (expert!) Automatically merge without updates label Dec 4, 2023
@mergify mergify bot merged commit 8a11dec into master Dec 4, 2023
67 checks passed
@mergify mergify bot deleted the mfig-follow-empty branch December 4, 2023 20:13
Copy link
Member

@kriskowal kriskowal left a comment

Choose a reason for hiding this comment

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

(Also looks good to me.)

What kinds of error cells occur? Do some of them suggest that the stream should terminate? Errors emerging from an async iterator usually imply termination.

@michaelfig
Copy link
Member Author

What kinds of error cells occur?

Deserialization errors, or problems interacting with a given RPC node.

Do some of them suggest that the stream should terminate?

Not usually, as auto-failover and round-robin behaviour can be part of the Leader that is being consumed by the iterator. They should be surfaced for the application to deal with, but continuing to produce values is legitimate behaviour.

Errors emerging from an async iterator usually imply termination.

Termination is a legitimate application response. And unrecoverable internal errors in the iterator code would cause unavoidable termination.

mhofman pushed a commit that referenced this pull request Dec 6, 2023
fix(casting): properly follow an unpopulated node
mhofman pushed a commit that referenced this pull request Dec 6, 2023
fix(casting): properly follow an unpopulated node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agoric-cli package: agoric-cli automerge:no-update (expert!) Automatically merge without updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

casting iterate does not produce value when subscribed before node created
3 participants