Finally got inspiration from this thread and was able to solve my own issue. Need to make sure:
- Gc is turned off upon instantiation of the ydoc.
const doc = new ydoc({gc:false})
- Do that from both client and server side, and throughtout the life cycle of a ydoc.
That did the trick for me.