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: ignored subscriptions not being read #3695

Merged
merged 2 commits into from
Feb 12, 2025

Conversation

nedsalk
Copy link
Contributor

@nedsalk nedsalk commented Feb 11, 2025

Summary

Fuel network logs showed some subscriptions weren't being closed and the current hypothesis is that the TS SDK is the culprit because it doesn't automatically read data as it comes from the node but rather waits for the user to start reading it. Even though the fuel-core nodes do close subscriptions once they stream all the data, they still have to wait for ACK messages from the clients and it might be the case that sometimes the clients' TCP receive buffer gets filled up to the point that they stop sending ACK messages to the server (because they don't read the stream), putting the server in a stalemate position until it kills the subscription via timeouts.

The next step would be to integrate the submit mutation ergonomically via

so that users can decide to not use the subscription if they don't need it.

Checklist

  • All changes are covered by tests (or not applicable)
  • All changes are documented (or not applicable)
  • I reviewed the entire PR myself (preferably, on GH UI)
  • I described all Breaking Changes (or there's none)

Sorry, something went wrong.

@nedsalk nedsalk added the bug Issue is a bug label Feb 11, 2025
@nedsalk nedsalk self-assigned this Feb 11, 2025
Copy link

vercel bot commented Feb 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fuels-template ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 12, 2025 10:51am
ts-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 12, 2025 10:51am
ts-docs-api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 12, 2025 10:51am

@nedsalk nedsalk changed the title fix: ignored subscriptions weren't being read fix: ignored subscriptions not being read Feb 11, 2025
@nedsalk nedsalk marked this pull request as ready for review February 11, 2025 13:57
@nedsalk nedsalk enabled auto-merge (squash) February 12, 2025 10:43
Copy link
Contributor

Coverage Report:

Lines Branches Functions Statements
77.17%(+0.02%) 70.71%(+0.02%) 75.31%(+0.01%) 77.16%(+0.01%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
🔴 packages/errors/src/test-utils/expect-to-throw-fuel-error.ts 91.66%
(-0.34%)
88.88%
(+0%)
100%
(+0%)
91.66%
(-0.34%)

@nedsalk nedsalk merged commit 75d7f39 into master Feb 12, 2025
25 checks passed
@nedsalk nedsalk deleted the ns/fix/always-read-subscriptions branch February 12, 2025 11:05
nedsalk added a commit that referenced this pull request Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve GraphQL subscriptions handling
4 participants