LuckPerms

LuckPerms

41.4k Downloads

Spamming in console

myfbone opened this issue ยท 12 comments

commented

I have this red spam in console
https://pastebin.com/0dE1za4i
It's really huge and I cannot even pastebin all of log

commented

This was changed so data is now unloaded after a short delay.

commented

Have you read the error message?

commented

Yes. I just have to say that this message is spamming like a sh*t. Can I somehow manage to disable it not occurring lags?

commented

Then you clearly didn't read the error or else you would know what to do to disable this:

Could not pass event DamageEntityEvent to WorldGuard v7.0.1-SNAPSHOT;1945-b0e4cf1
java.lang.RuntimeException: The operation to load user data for '6f46f93e-bed9-34c3-a487-6df510a3c072' was cancelled by LuckPerms. This is NOT a bug.
The lookup request was made on the main server thread. It is not safe to execute a request to
load data for offline players from the database in this context.
If you are a plugin author, please consider making your request asynchronously.
Alternatively, server admins can disable this catch by setting 'vault-unsafe-lookups' to true
in the LP config, but should consider the consequences (lag) before doing so.

Please report this to the dev(s) of WorldGuard since this is a common problem of their plugins for well over a year now.

commented

I have already done it and that's what he said:

oh, yea. v3 uuid.
figures
dunno, not my problem. WG is doing perms checks and LP doesnt have the uuid cached prob cuz it's not valid
no clue, you can ask but they might turn you away too
commented

The common problem was looking up perms for NPCs (citizens etc) since they are implemented as players. WG "fixes" this by ignoring NPCs (by default).

The issue here is completely different - that's an actual player (albeit offline) and WG is doing a perfectly valid permission check for them.

commented

I think you're missing the point.

Then explain it better.

As far as I understand this issue is about the console being spammed with these offline lookup warnings/errors. All I've been talking about is when it appears and when it doesn't and other technicalities about it. So what are you talking about then? It seems utterly unrelated.

commented

Checks for offline players need to happen async. Any check that might load data needs to be run async.

The core issue is that LP can't hold the permission data for everyone in RAM. That's why it's happy to do permission checks for offline players, but it needs to load it first. If this happens async, then LP won't complain.

Additionally, there is nothing LP can do. If an offline permission checks happens the player needs to be loaded. It will stay loaded for a bit too, to prevent unnecessary loads, but that's all LP can do.

The only thing anyone can do is running permission checks which may check an offline player (or not even a player at all) async.

commented

Sorry, to be clear, the player is or at least was just online, as in this case they just shot an armor stand with an arrow that is ticking damage on that armor stand. We're doing a permission check to see if that damage is allowed. This is an entirely synchronous process. The entity object still exists in the server whether or not the player has disconnected. We are not looking up some OfflinePlayer (which is not an entity!) and doing perms checks on that.

commented

If they are online the warning doesn't appear, as their data is still loaded.

commented

I think you're missing the point.

commented

Understood - I can perhaps lengthen the time user data is retained after disconnect to allow for this sort of thing.