rocicorp / replicache

Realtime Sync for Any Backend Stack
https://doc.replicache.dev
1.01k stars 37 forks source link

Invalid ref count during persist #1047

Open arv opened 1 year ago

arv commented 1 year ago

https://discord.com/channels/830183651022471199/1095424613284065330/1095424613284065330

We are hitting this assert:

const oldCount = this._refCounts.get(refHash);
...
assert(oldCount > 0);

This is in some old code dealing with the in memory cache and the error happens during persist.

We've made significant change to both the on memory cache and to persist so it is possible this assert no longer fails.

arv commented 1 year ago

Most likely fixed by https://github.com/rocicorp/mono/commit/4378df2f