a-type / verdant

🌿 Storage, sync & realtime for local-first web apps. Build an app in minutes, deploy as a static page, and add sync with a few lines.
https://verdant.dev
GNU Affero General Public License v3.0
191 stars 4 forks source link

Server order resets to 0 when all replicas sync up, then subsequent operations have low orders and are ignored #376

Closed a-type closed 6 months ago

a-type commented 6 months ago

ugh, I called this too.

a-type commented 6 months ago

Well, I can't actually figure out how to reproduce this.

I can get all replicas acked to the same server order, which is the latest operation's order, but the rebase actually only goes up to n-1 and leaves that last operation intact. Which theoretically should prevent this problem.

Perhaps this was some weird fluke with setting up Biscuits?

I did at one point clear remote server data. Perhaps this didn't clear replica server order acks too?

a-type commented 6 months ago

Resetting server data should also clear out replicas. I'm stumped.

a-type commented 6 months ago

Still unable to reproduce after trying server data reset and client data reset.

a-type commented 6 months ago

Figured it out. Rebase was deleting all ops for an OID, not just the rebased ones!