Skip to content

Purging a large amount of content may cause the server to crash #384

Description

@CodeZhangBorui

When I use the Purge command to clean a large amount of content (e.g., over ten thousand entries), Ledger causes the server's main thread to block and eventually triggers the server Watchdog to force the server to crash.

Although it might be possible to try disabling the server Watchdog to solve this problem, I actually hope that Ledger can process or batch process on another thread to prevent the server from freezing.

Expected behavior

Execute the Purge command normally.

Observed/actual behavior

The server froze and then crashes due to watchdog.

For more information, see [Other].

Steps/models to reproduce

  1. Normally start the server
  2. Try executing a massive Purge command (e.g. /ledger purge source:@gravity before:3d)
  3. The server initially observed a severe drop in TPS, and then (after ~10s) completely froze.
  4. Triggering Watchdog timeout, server crashes

What operating system are you running

Linux

Minecraft version

26.1.2

Ledger version

1.3.22

Logs

Agreements

  • I am running the latest version of the mod.
  • My version of Minecraft is supported.
  • I have searched for and ensured there isn't already an open issue regarding this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions