matcracker / BedcoreProtect

BedcoreProtect is a fast, efficient, data logging and anti-griefing tool for PocketMine servers. Rollback and restore any amount of damage.
https://poggit.pmmp.io/p/BedcoreProtect/
GNU General Public License v3.0
43 stars 8 forks source link

Improve logic to get logs with lookup command #51

Closed matcracker closed 3 years ago

matcracker commented 3 years ago

Issue description

Actually if you have a database with a lot of records and you run /bcp lookup t=5d, the server crashes due to memory limit. It's necessary to limit the number of records and change the behaviour of /bcp show command.

Steps to reproduce the issue

  1. Database with a large number of logs
  2. Running /bcp lookup t=5d
  3. Fatal error: Allowed memory size of 1073741824 bytes exhausted

OS and versions

Crashdump, backtrace or other files