You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Store __inverseRels__ not cleaned up with transform option { useBuffer: true } #988
as otherwise the performance of indexeddb bulk operations is very very slow.
Unfortunately, with the latest version, we see that the store for keeping track of rels is not touched at all when removing a record.
Example:
// source = indexeddbsourcesource.push([source.transformBuilder.removeRecord({id: '123',type: 'test'})]);// Result in indexeddb with `useBuffer: true`// 1. Record '123' is removed from store `test`// 2. All relationships in store `__inverseRels__` of record '123' are still there// Result in indexeddb with `useBuffer: false`// 1. Record '123' is removed from store `test`// 2. All relationships in store `__inverseRels__` of record '123' are removed
After some digging, I think the AsyncCacheIntegrityProcessor processor creates the transforms that clean up the __inverseRels__ store with useBuffer: false.
With useBuffer: true, it seems to be the job of SyncCacheIntegrityProcessor, but somehow it fails to return the changeset to remove the inverse rels @
Activity
enspandi commentedon Mar 20, 2023
@dgeb I think the line here is missing to add the object to the
_deltastate, similar to what theaddInverseRelationshipsSyncabove does:orbit/packages/@orbit/record-cache/src/simple-record-transform-buffer.ts
Line 213 in b57cfcb
I patched the
SimpleRecordTransformBufferfor now and it seems to work.