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]: Clear scheduledBatchTimer will cause query lost when batchesByKey has multiple keys #10208

Closed
yar2001 opened this issue Oct 19, 2022 · 5 comments
Labels
🔍 investigate Investigate further

Comments

@yar2001
Copy link

yar2001 commented Oct 19, 2022

Intended outcome:
Persisted Queries should retry when it meet PersistedQueryNotFound message (when works with HTTP batch)

Actual outcome:
The Persisted Queries does not retry because the timer will be clear by new schedule with different key.

How to reproduce the issue:
The bug is obvious in source code, when Persisted Queries start a retry using batch schedule timeout, and some other normal query also schedule with a new key, the old timeout will lost.

Versions

System:
OS: Linux 5.19 Debian GNU/Linux bookworm/sid
Binaries:
Node: 18.7.0 - /usr/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 8.19.2 - /usr/bin/npm
Browsers:
Firefox: 102.3.0esr
npmPackages:
@apollo/client: ^3.7.0 => 3.7.0

@yar2001
Copy link
Author

yar2001 commented Oct 19, 2022

Seems the bug is caused by this commit.
When isFirstEnqueuedRequest is true, the timeout should not be cleared. Maybe more clear code and corresponding test should be added

@bignimbus bignimbus added the 🔍 investigate Investigate further label Oct 19, 2022
@yar2001
Copy link
Author

yar2001 commented Oct 26, 2022

Hello, I think it is a bug easy to fix but has serious effects, will you @benjamn take a look?

@yar2001
Copy link
Author

yar2001 commented Oct 16, 2024

The problem seems to be solved since I haven't met the Persisted Queries problem again.

@yar2001 yar2001 closed this as completed Oct 16, 2024
Copy link
Contributor

Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better.

Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
For general questions, we recommend using StackOverflow or our discord server.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🔍 investigate Investigate further
Projects
None yet
Development

No branches or pull requests

2 participants