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 notification task not properly ended #4019

Merged
merged 5 commits into from
Mar 6, 2024
Merged

Conversation

elmattic
Copy link
Contributor

@elmattic elmattic commented Mar 1, 2024

Summary of changes

After canceling a subscription, a WebSocket client would still get stale responses.

Changes introduced in this pull request:

  • Fix Forest sending stale notifications after channel cancelation
  • Add debug traces

If you enable debug traces you shoud now see something like:

...
2024-03-01T15:47:19.338708Z  INFO filecoin_proofs::api::winning_post: verify_winning_post:finish    
2024-03-01T15:47:19.363249Z DEBUG forest_filecoin::rpc::channel: sending notification {"jsonrpc":"2.0","method":"xrpc.ch.val","params":[0,{"Type":"apply","Val":[{"Miner":"t017387","Ticket":{"VRFProof":"llZkMUVsIkbv8BJdM5jeE4qqA+3oR6K+QMHqnpikTLCNo7UZ2bJpoCdhYJm/TxWzFbEhahaNXukBbVz1O4keo7YRteUMbn6i34wZ3I1OWrSz/G1klGnE9Ium7oMxrz3A"},...}
2024-03-01T15:47:19.364928Z  INFO forest_filecoin::chain_sync::tipset_syncer: Successfully synced tipset range: [1399384, 1399387]
2024-03-01T15:47:28.203990Z DEBUG forest_filecoin::rpc::auth_layer: Decoded JWT Claims: read
2024-03-01T15:47:28.204116Z DEBUG forest_filecoin::rpc::channel: Got cancel request: id=23
2024-03-01T15:47:28.204162Z DEBUG forest_filecoin::rpc::channel: Sending close message: "{\"jsonrpc\":\"2.0\",\"method\":\"xrpc.ch.close\",\"params\":[0]}"
2024-03-01T15:47:28.204381Z DEBUG forest_filecoin::rpc::channel: Send notification task ended
...

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

@elmattic elmattic marked this pull request as ready for review March 1, 2024 16:35
@elmattic elmattic requested a review from a team as a code owner March 1, 2024 16:35
@elmattic elmattic requested review from lemmih and aatifsyed and removed request for a team March 1, 2024 16:35
@lemmih lemmih added this pull request to the merge queue Mar 5, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 5, 2024
@hanabi1224 hanabi1224 added this pull request to the merge queue Mar 6, 2024
Merged via the queue into main with commit 7336317 Mar 6, 2024
27 checks passed
@hanabi1224 hanabi1224 deleted the elmattic/fix-channel-notif branch March 6, 2024 12:26
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.

None yet

4 participants