EngineHub / WorldGuard

🛡️ Protect your Minecraft server and lets players claim areas
https://enginehub.org/worldguard/
Other
835 stars 546 forks source link

Failed to delete old native lib on windows when locked. #2123

Closed andrewkm closed 3 months ago

andrewkm commented 3 months ago

WorldEdit Version

WorldEdit v7.3.6-SNAPSHOT+6888-350dfa1

WorldGuard Version

WorldGuard v7.0.11-SNAPSHOT+2287-8ffc81a

Platform Version

Paper 1.21-124-master@df3b654

Confirmations

Bug Description

When running on a windows machine using several instances of the above setup, WG attempts to delete the old still locked sqlite temp lib. This fails and throws errors in the console.

https://pastebin.com/raw/WzA8168U

Similar issue https://github.com/lz4/lz4-java/issues/132 and potential solution can be found here: https://github.com/lz4/lz4-java/commit/08b3bff3491eafd5238c5adf79113e56f6821e82 though I am unsure if this would apply here as it may affect the other instances still using that old temp locked library(?)

Expected Behavior

Either do not throw an error for this and silently fail or throw a one liner warn(?) Preferably check if locked, if so don't attempt to delete, if not (meaning other instances on the machine are updated and the old lib is no longer locked) then delete.

Reproduction Steps

  1. Use above setup.
  2. Use several instances.
  3. Wait for sqlite update, and restart one of the instances.

Optional WorldGuard-Report

No response

Anything Else?

Let me know if you need any other details. Thanks.

wizjany commented 3 months ago

The driver is provided and managed by the server, WG doesn't do anything here.