`collection.sync()` doesn't work as expected [Kinto.js]

77 views Asked by At

I have two clients A and B which performed this operations:

  1. Client A created and .sync()ed a one record collection.
  2. Client B .sync()ed and it received the collection with a single record.
  3. Client A deleted and .sync()ed the collection. At this point there is no collection in both client A (checked via JS api and IndexedDB api) and the server (I checked with http calls).
  4. Client B .sync()ed, but the record is still there.

I don't think this is the intended behavior. What could cause this?


P.S. Client A deletes with virtual: false, because it doesn't need the records in the local db anymore. Might that be it? Does this changes something on the server?

1

There are 1 answers

1
Natim On

If you use virtual: false you will never notify the server that you have deleted the record.

If you want to sync the deleted record status, you should not use virtual: false. It will get deleted locally after your next sync.