-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UUID Support #811
Comments
I second this. This is incredibly important. |
Agreed. |
Is this something you are working on? |
I have been incredibly busy the last couple months with university so I've been slacking a fair bit w/regards LWC :( I'm going to try my best to get this done tonight |
That is really ambitious! I will be genuinely massively impressed if you Thanks a lot. I wish you the best with your university work. |
One night is indeed a stretch but a start is better than nothing :) Given how the current LWC stores some things in the DB conversion is going to be a pain.. |
Yes, I noticed that. I don't envy you. |
I thought I'd add this: I've been using this to get UUIDs into a database, since bukkit doesn't |
Indeed, that's (offline mode) probably the most annoying thing about it all.. The actual mass conversion shouldn't be so bad (slooowly in the background). |
yay you're there :D Can't wait to see LWC updated |
Offline mode: Names shouldn't be converted to the UUID of the user with the same username (online mode) as long as the player already logged into the server at least once. Offline mode might still have a couple bugs as a result. * When a protection is loaded: Check if it needs converting; if it does, convert it * Use UUIDs when creating protections and modifying rights * /cadmin find now searches by UUID * Change output from varous commands to attempt to resolve a player's name instead of using a UUID This does not yet slowly crawl the database to convert everything.
The initial work should be ready in builds 914 onwards. At the moment, conversions are done in place as protections are seen. No full conversion is done automatically yet. If you want to confirm if a protection has been converted, you may use Rights management will also resolve UUIDs automatically. Unknown players will still be added, and then resolved to the UUID when they actually exist at some point in the future. |
yay :D Is it confirmed to work in 1.7.5? or its only for 1.7.9? I have a database of 10.2k of protections... they will be converted or not? (I guess yes later?) |
Yes, seems fine (tested on b3042). Actually, 1.6.4 seems to work perfectly fine too even though it does still convert to UUIDs
If they're all cached at startup (large precache size), they'll all be converted on startup. If precache was (e.g.) 1000, 1000 protections would be converted, followed by any that are accessed by players in the world. If you do try it, of course I'd recommend taking a backup first if you haven't already :-) |
Haha Sweet! Will do tests! |
Just thought to chime in. Using dev build 914 on 1.7.9. Mysql seems to hang every single server start-up. Not sure if it is converting or not, but takes ~10-15 minutes to load past Mysql. After restarting the server, I have to go through the entire wait process again. Cache size of 75,000, precache -1. Config: http://paste.ubuntu.com/7306183/ Using BungeeCord (online) and Spigot (offline). Bungee forwards the online UUID to Spigot, but I believe Spigot does the UUID conversions online regardless of setting.
Edit: Ran /lwc info and punched a protected door, no UUID output. Didn't seem to convert old data. Also restarted with precache 75,000, still didn't convert old data. Just hangs for 10 minutes until it starts. :( Newly protected chests seem to have UUID, but not formatted correctly nor does it have a name reference. http://i.imgur.com/AuTMOno.png |
Thanks @mibby and just to confirm, protections are working fine still? I
|
I'm not sure, only tested with myself online unfortunately, sorry. All I know is regardless of what settings I use, old protections aren't being converted automatically and it takes an extremely long time to load regardless of what is set. When a new protection is created or when a user uses his own protection, it seems to update with the UUID. It would be nice to have all protections automatically convert and not have a long wait every single restart. :P |
I'm using the version before you disabled automatic conversion of the cache in favour of interaction (so that I an grab all the uuids then use the main version) but the update to UUIDs was imperfect:
These are players for whom I know there is is a UUID. The lack of conversion associated with a null data column:
That's a difference of 7. So I ran this query:
All the players listed by the above query do not exist - they are effectively offline mode names. We're not an offline mode server but from time to time things have come up where offline names have been used e.g. when spigot had that login bug In conclusion: UUIDs are not being updated where the data column is null. I want to bypass this issue using the following query but I would like some sort of confirmation that is won't stuff up my database first.
lwc_history does not convert to UUIDs either. I'm not sure if this is a problem:
lwc_menu_styles (I'm not even sure if this is used any more) doesn't update either:
lwc_actions, lwc_locks, lwc_modes, lwc_sessions and lwc_jobs are empty tables in my database so I can't confirm whether these are up to date or not. Can I suggest an alternative arrangement for the storage of UUIDs in mysql? The advantages of this are: smaller database size (with quicker lookups?) and you don't have to rely on bukkit's methods to get an offline player by their UUID since player.dat files are occasionally corrupted when servers crash |
I agree with @dddeeefff I would recommend to use a lwc_players table, By that making the storage table not dependent on player names / uuids. |
good catch, although at the moment only lwc_protections is converted. @dddeeefff I think that would certainly be more interesting to do (and straightforward). I assume you're also talking about converting all player fields in the DB to use integers instead of strings? I think in practice that would definitely be a lot faster, and is something I did as well in the LWC v5 rewrite (though far from done). At the moment, you've likely already noticed that UUID conversion indeed isn't done on player names that don't exist. So it's reconverted everytime. A single conversion (to a The only problem is actually converting it in that case. Some LWC databases are massive (millions of protections). Simply creating a new set of tables seems like the easiest (and then slowly copying over) so that it can be ran in the background (while putting new protections in the new table). If all of that sounds about right to you I'll go ahead and toy around with it on a second branch (any associated builds with be on a second Jenkins project.) btw - lwc_actions, lwc_locks, lwc_modes, lwc_sessions, and lwc_jobs are REALLY old tables. They haven't been used for a very long time (and can be dropped if you don't want them there.) edit: the other interesting thing to note is that doing it with a separate |
I figured these were old tables. The server and its maps are really old now.
|
I'm not really seeing why it wouldn't convert if data is null. It checks the owner field to see if it's not a UUID, and then anything that could be inside data. If you're on the latest build, then the only protections that are converted at the moment are ones that a player interacts with physically. |
I'm not I deliberately chose the second most recent because I wanted to get it all moved over. I was going to move to the newest build afterwards to prevent that loadup time I thought maybe they might not be loaded into the cache to begin with, but a quick count(*) check on the table shows there are roughly the same amount of rows. |
Okay I found one protection and /cinfoed it. It's now no longer an unconverted one. I don't fancy doing that with all 74000 unconverted ones though. Here's that protection:
Perhaps there's something blocking the update of the protection because you're trying to match the flags and rights as well. |
Full conversion will be done once I've settled on a definite solution although I'm thinking the separate players table is likely the better of them. |
…converter is ready (which will be quite different.) This will still support protections that did convert to have UUIDs
… -- the new converter will change the format so better keep better backwards compatibility (/cremoveall, and so on) for now
@Hidendra Planning to use Spigot 1.7.9, I wonder, is it safe to use LWC in dev version? I know its subject to bugs but Im unsure if the current stable LWC is working on 1.7.9 |
@TNTUP The latest builds should be fine; no conversion is done in them right now. This should be mostly completed tomorrow .. I haven't pushed much to the The biggest problem I had was issues I'm having with MySQL on Windows and a very large LWC test db (10 GB) -- works ok in the MySQL prompt but when LWC's connected with JDBC it's extremely slow (even selects on an empty table). I'll likely have to try reimporting it... |
This should now be working as it should on the 811-uuid-conversion branch / jobs. Note that they are NOT backwards compatible (at all) with any other builds. Does anyone want to give this a shot on a test server (with a copy of your database)? I would appreciate it a lot, incase I've missed something even after using quite a few different DBs. Sample output (when the server starts):
Once completed, your database will then look something like this (tables wise):
Sample contents of the new tables: lwc_players
id => (uuid, name) One of uuid or name can be null. This is to allow smooth transitions (unknown players) and will be updated automatically (not done yet). lwc_protections
Changes: owner is now INT, and rights.name is now an integer for the player (for type = 1 = PLAYER) lwc_history
Changes: player is now INT, data is now JSON, and creator/destroyer inside of the data field use integers for the player |
and also: most commands (if not all) should be working as expected. The only "weird" thing you might see is that player output in some places will still show something such as |
@Hidendra Will run it on my test server, Will report back soon. EDIT: On the first run (Start -> Stop, Change config -> start) (MYSQL DB) |
@raldo94 Thank you. It looks like that was because it converted SQLite -> MySQL but it then tried converting the SQLite database afterwards after it was closed. It should convert without error now. Everything did convert correctly before except for the creator/destroyer in lwc_history's metadata which is largely irrelevent. It's only relevent if you want to see who created/destroyed a protection that no longer exists. |
Spamming this error when trying to convert, latest UUID build. http://ci.griefcraft.com/job/LWC%20811-uuid-conversion/7/
|
Any updates on this? 1.7.10 is out, and I guess 1.8 is coming soon, no date yet hopefully. This is the most last plugin waiting for the UUID update |
@Hidendra some news ? :( |
@MrMaleficus Latest dev build supports UUID, but current older databases aren't converted (or I should use the LWC-ConverterUUID then go back to LWC as normal. Newer protections registers UUID now. It works on my end so it should work on your too. If anyone knows a command that will convert existent old database to UUID names, that will be appriciated! |
The UUID system is working, yes. But, the /climits ignore the protections for the UUID system... |
@MrMaleficus /climits you mean like limited X protectable containers per player right? If so, oh.. well myself I have no limits because I don't see why but for preventing chest-lock abuse etc yeah |
The upcoming release of 1.7.6 (and above) will be using UUIDs instead of player names since Mojang will be adding the ability to change player names soon.
It is very important that LWC implements this as soon as possible to prevent any issues from arising.
http://forums.bukkit.org/threads/psa-the-switch-to-uuids-potential-plugin-server-breakage.250915/
The text was updated successfully, but these errors were encountered: