-
Notifications
You must be signed in to change notification settings - Fork 108
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
Token 1 not in stream cache. #270
Comments
Hum how often does this happen? |
I will send you a test tomorrow I wrote that can repeat this each time it's run. |
@chrisabrams -- can you send me a script to reproduce this error when you have some time? Thanks! This error can happen if we request more data for a cursor that's empty, but this shouldn't happen with |
Before I do that, I first need help with this: #272 |
Alright, here is how to reproduce this error on this project: https://github.com/f12/structure-api
You will see the error pop up on the 2nd of 2 tests:
The cursor is emitting the changes from the root model of the project. |
Hum, that's a gigantic repo and I have a hard time browsing through that. |
The root model that I linked to at the bottom of the last comment is the only line of code in the repo that uses the change feed / cursor. In that file:
|
Fixed in 2.3.21. |
Hmmm. Alright, I'll have to dig deeper on that :O At least my bug helped fix something :) |
@neumino yes, in this test, I am closing the cursors twice. There are two places that keep track of the cursors: the model and the server. If the server shuts down or restarts, I want to tell the cursors to close, and if the model is disposed, then I tell the cursors for that model to close. Therefore, I have a full list of cursors, as well as a list per model. Ideally, when a model is disposed of, I could remove the cursor by ID from the full list. Is that what the token is? An incremental count up of the change feeds? |
No, the token is a RethinkDB concept - https://www.rethinkdb.com/docs/writing-drivers/ |
I'm not sure if this is actually an error, as my code runs as intended. I came across this while working with change feeds.
I only saw it because during debugging I have the
process.uncaughtException
fire aconsole.error
.The text was updated successfully, but these errors were encountered: