Skip to content

[Question]: Will database operations be handled asynchronously? #110

Description

@rugiaDev

Your Question

Hi, thanks for your great work on LiteEco.

I have a question regarding database operations.
Currently, player data (such as balance) is saved and loaded synchronously, including on player quit.

This raises a potential issue when switching servers through a proxy setup (e.g., Paper/Velocity).

  • Example: A player quits Server A → data is still being saved → at the same time, the player joins Server B → Server B loads old data before Server A finished saving.
  • In this case, there is a risk of duplicated or inconsistent balances (e.g., money duplication).

My question:
Do you have plans to handle database save/load asynchronously, or to add safeguards (e.g., locking, queueing, Redis presence keys, etc.) to prevent this type of issue?

Thanks in advance!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

QuestionQuestion or help

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions