Open ehsannas opened 1 year ago
This only happens if the query result set is very large; so large that it would get the UNAVAILABLE after 60 sec
error (as described in https://github.com/googleapis/nodejs-firestore/issues/964. To address this, the client under the hood attempts to "continue" getting the results by issuing a new request with a cursor (using startAfter
). However, it is important that the new request (with startAfter
) shows a consistent view of the documents at the time that the original query was made. If that time is "too old", the above error will be seen.
We plan to address this, but the timeline is currently not clear.
For the time being, if such consistency guarantee is not needed by the developer (or if they know the data is not fast changing), one could manually paginate these requests as was suggested in https://github.com/googleapis/nodejs-firestore/issues/964#issuecomment-1500332130.
It was reported here https://github.com/googleapis/nodejs-firestore/issues/964#issuecomment-1500332130 that when
query.stream()
is used on a very large collection (or query with a large result set), the following error occurs:Thanks @klon for reporting this.