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
If I add console.log statements to this, I find that inside this function, the tagRelationship is deleted, however after it completes, the tagRelationship magically comes back to the database.
I assumed this had something to do with transaction rollback, but after digging into the output of the sync messages I am seeing some funniness.
First, during the push phase, I see a Sync request with this object:
As always, you've nailed another multiEntry bug :) First time in liveQueries, then in the cache and now in dexie-cloud server. Every where...modify operation is re-executed on the server to assure sync consistency and the client get the server's picture of the reality after a sync. Now, the server is unaware of the tags being multiEntry so this need to be propagated from the client somehow.
... just be aware that this would disable sync consistency though - if some other offline client had added new outlineItems with relationships to a tag being deleted, it could result in orphan relationships from the deleted tag afterwards.
Will prioritize to solve this soon after the public release on march 27.
I don't have a full repro yet, but I have a db with a multi-value key path indexed like so:
The typescript definition for the table is:
I have a complex mutation function that deletes the relationships in a transaction:
If I add console.log statements to this, I find that inside this function, the tagRelationship is deleted, however after it completes, the tagRelationship magically comes back to the database.
I assumed this had something to do with transaction rollback, but after digging into the output of the sync messages I am seeing some funniness.
First, during the
push
phase, I see a Sync request with this object:Collapsed for Brevity
I don't see anything suspicious in there, but included it because you might.
Later, during the pull event, I see this message:
Collapsed for Brevity
Specifically, there is an upsert to the tag relationships table that I think is what is causing the relationship to be added back.
I know there have been issues with syncing multi-value key paths before, and I suspect this is a related issue. Hopefully it is an easy fix.
The text was updated successfully, but these errors were encountered: