Sklo:D

WU 1.8.0.3 - SteamID Table Problem

Recommended Posts

Currently the steamid of every player is stored in wurmplayer.db in the table STEAM_IDS.

On storing there is a bigger problem causing the table to grow extremly huge over time. There is a bug in the code where the steam id for every player is stored in a new row EACH login, which means one new row for every login, old rows are not deleted/updated as they should.

 

And then there is another problem, the table schema seems to be not set to auto-increment properly or however the ID should be, since the ID column is always NULL. The column can either be removed or should at least have the right value.

 

"NULL"        "503383590400"    "765611980673xxxxx"    "1536429967178"    "1536429967178"
"NULL"        "503383590400"    "765611980673xxxxx"    "1536431719349"    "1536431719349"
"NULL"        "503383590400"    "765611980673xxxxx"    "1536432049106"    "1536432049106"
"NULL"        "503383590400"    "765611980673xxxxx"    "1536522635625"    "1536522635625"
"NULL"        "503383590400"    "765611980673xxxxx"    "1536522698491"    "1536522698491"

Share this post


Link to post
Share on other sites

Just to keep track of everything. This problem has NOT been fixed in WU version 1.8.0.3.

Share this post


Link to post
Share on other sites
Posted (edited)

Bump not fixed in 1.9.0.0

Edited by Retrograde
keep your voice down please

Share this post


Link to post
Share on other sites
Posted (edited)

I posted my theory in the wrong place, ugh. anyway its here

 

3 hours ago, Cuddles said:

edit, nvm was half asleep.

 

theory #2

 

I don't think the hashmap "historySteamId"  is even being populated and so when the method checks if the steamid already exists in the hashmap it always returns false and so adds it again to db.

in com.wurmonline.server.players.DbPlayerInfo the method setSteamId checks if the steamid is already in the hashmap and if not then it adds it to the db, weird way of trying to do things but regardless I am pretty sure the hashmap is actually empty as the method loadHistorySteamIds is never actually called anywhere. That probably sounds confusing.

 

tbh i think only way to fix this is to completely replace the code in method com.wurmonline.server.players.DbPlayerInfo.setSteamId to something that actually works...

I don't have a fix as they didn't make the stuff static so would need to hook in a few places to try and fix this crap job they did.

Edited by Retrograde
changed link to quote

Share this post


Link to post
Share on other sites

I missed this when originally reported.

 

I'll work to fix this before the beta goes live.

 

6 hours ago, Cuddles said:

I don't have a fix as they didn't make the stuff static so would need to hook in a few places to try and fix this crap job they did.

 

Thanks for the complement! ❤️

Share this post


Link to post
Share on other sites

Has anyone else  been able to successfully #pardonsteam?  I think it's broken, as I get no options when I try it, and so far nobody I've spoken with can confirm it is working.  Maybe related to the other issue about Steam IDs?

 

Share this post


Link to post
Share on other sites

I did test the command when I implemented everything, so I'd need some data to work with to see why it's not working.

 

Heck, I tested all of this. So I'm extremely interested in what's going on and will do a post when I get to the bottom of it.

Share this post


Link to post
Share on other sites

Well that was quick. Thanks to Cuddles up there for their complement and the tip. I apparently missed adding the load calls when I shamelessly copied the IP History code for use with SteamIDs.

 

Yes @Batta- this could affect pardons.

 

We've got a few other bugs we're looking at and will aim for a beta version bump this weekend with this fix and any others we can crank out.

Share this post


Link to post
Share on other sites

 

10 hours ago, Keenan said:

Well that was quick. Thanks to Cuddles up there for their complement and the tip. I apparently missed adding the load calls when I shamelessly copied the IP History code for use with SteamIDs.

 

Yes @Batta- this could affect pardons.

 

We've got a few other bugs we're looking at and will aim for a beta version bump this weekend with this fix and any others we can crank out.

 

Sounds great thanks for bringing this to a good solution.

Share this post


Link to post
Share on other sites
Posted (edited)

haha i am sure there was a compliment in there somewhere.

Did you also forget to call the change milkable aswell, atm it only resets with hummid drizzle or server restart.

I should pay more attention to this section of forum I guess instead of just modding.

I am glad you can fix that steamid relatively easily cus I was hooking into so much stuff to fix it as a mod and although I was there I didn't want to release it, I actually hate using hooks as they can break with every patch 😃

 

Edit:

Personally I would just reset the milkable and sheared with the crop tick but that is just me.

 

Double Edit:

This is what I had in my mod to reset milk and shear, maybe it can save you some time lol

	      Creature[] crets = Creatures.getInstance().getCreatures();
	      for (int x = 0; x < crets.length; ++x) {
	    	  if (crets[x].isMilkable()){
	    		  crets[x].setMilked(false);
	    	  }
	    	  if (crets[x].isSheared()){
	    		  crets[x].setSheared(false);
	    	  }
	      }

 

Edited by Cuddles

Share this post


Link to post
Share on other sites
7 minutes ago, Cuddles said:

Did you also forget to call the change milkable aswell, atm it only resets with hummid drizzle or server restart.

Our creatures are milkable a few times a day, without humid drizzle or a server reset.  Same when I was playing on someone else's server last week.

 

Share this post


Link to post
Share on other sites
Posted (edited)
4 minutes ago, Batta said:

Our creatures are milkable a few times a day, without humid drizzle or a server reset.  Same when I was playing on someone else's server last week.

 

weird, our server they only get reset with hummid drizzle or server restart, thats why I made the mod  *shrug*

 

Edit:

I also couldn't find anywhere in server code where it is reset to milkable.

Edited by Cuddles

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now