pinqy520 / mobx-persist

persist mobx stores
MIT License
560 stars 62 forks source link

Debounce: Missing data #70

Closed dnish closed 5 years ago

dnish commented 5 years ago

Hey, we synchronizing some MobX maps with our database. When we do a mass insert and use the debounce property, some documents are not available after insert. When I remove the debounce property, everything is working fine again.

Meteor.ddp.on('added', (payload) => {
            [....]

            collection.set(payload.id, newDoc);

            if(payload.collection === "playlists") {

                setTimeout(() => {
                    console.log(payload);
                    console.log(collection.get(payload.id));
                },10000); // On some items we get undefined for the second call.
            }

        });
dnish commented 5 years ago

Have to close it, just recognized an internal issue how we sync our data