deg / re-frame-firebase

Re-frame wrapper around Google's Firebase database
95 stars 32 forks source link

interference between :firestore/on-snapshot subscriptions #26

Open jahenderson777 opened 6 years ago

jahenderson777 commented 6 years ago

I am finding that multiple :firestore/on-snapshot subscriptions interfere with each other. e.g. [:firestore/on-snapshot {:path-collection [:mydocs] :order-by [[:time :asc]] :limit 10}] and [:firestore/on-snapshot {:path-collection [:mydocs] :order-by [[:time :asc]] :limit 1}]

Randomly, after a few modifications to the firestore documents the "limit 10" query starts to return less than 10 results, and then less and less, until it returns zero documents, then the "limit 1" query also returns zero documents. It's almost like the cached query results are getting mixed up with each other.

EDIT: and to clarify, the documents are not being removed from firestore db. If you reload the page, all the documents re-appear as they should.

Can you suggest what I might be doing wrong, or could this be a bug?

gabrielsimoes commented 6 years ago

Sorry, it's been a long time, but I have only been able to look into this now. Are you still facing the issue? I'm not sure I understand what is happening, maybe if you could describe or give me an example?