Skip to content

Anyone faced the issue with the Upload queue not performing correctly ? #605

@abhishekm18-arbadev

Description

@abhishekm18-arbadev

Hi , i'm looking to migrate from MongoDB Atlas Device Sync(realm) to Powersync . I have followed the migration guide which is provided by the official blog and website of powersync itself. I'm facing a strange issue in my app which is a realtime , offline first chat app.

In this , when i send a message i'm performing 3 tasks from frontend associated to it for chat .

  1. Write the message payload to the local DB(sqlite) via powersync.execute() in the message table.
  2. Update the last message field of the chat table of local DB with the id of the above last message .
  3. Update the lastMessageReadTime field on the chat table of local DB with current time when seen for particular user.

I can see that the above transactions seem to perform good mostly when i'm doings chats back and forth at normal pace , like how a normal paced chat is done.
But this gets broken and messages go missing at receiver sides in cases of a group chats or even 1v1 chats when i look to exchange messages rapidly (like keep spamming).

It seems like the uploadData() in the backendConnector is not being called (database.getnextCrudTransaction doesn't return any record) even when the sql update / write transactions complete successfully in the local DB .

Please note that i have checked the backend api's and they are not creating an issue here.

Did anyone else face similar kind of issue ? Or if anyone can help me debug or understand the root cause of messages going missing. Your guidance and help is much appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions