Marriage Master

Marriage Master

4M Downloads

Something's messed up.

MithrandirCraft opened this issue ยท 12 comments

commented

Environment information
Plugin + server version info:


Marriage Master: 2.0.9-Release
Server: git-Spigot-1a3504a-a46fdbc (MC: 1.13.2)
Vault: 1.7.1-b91
PlaceholderAPI: 2.10.3

Online mode: no

BungeeCord: yes

Plugin config (optional)

Regular server: https://gist.github.com/MithrandirCraft/fb3250a46d935fc79e54dc80764e297d
Bungee: https://gist.github.com/MithrandirCraft/9aa34e75c6bfd241463a2473499c22df

Details

Description
I suspect my database's marriage table's foreighn keys may be pretty messed up since the last big update.
I thought it would be better to ask for advice here, and tell the exact symptoms for a propper fix. (Because otherwise I'd do a sql table truncation which might solve all these issues I've been experiencing, but would represent losing years of marriages)

Messed up situation 1:
A player (A) is currently being shown as married with a secondary account even though he already divorced that account, and married a new one (B).
(B) and (A) are suddenly no longer married, and obviously (B) cannot use the commands, since she's not married. But (A) can, with it's pre-divorced account.
It's as though the new marriage never happened. They're not even in marry list.

Messed up situation 2:
I married two test accounts together, and found that at least with one of them, when you change servers, the placeholder api tag shows the player as unmarried (sometimes), even though the marriage is listed in /marry list. There's no problem with the marriage in this case (probably because it's the first marriage for both accounts). However it's kinda strange that they sometimes don't show up as married.

In general, marriages are not functioning propperly, specially on long term.

Steps to reproduce
No idea. You need to have my server's environment I guess. And marry two players, possibly pre-married in the first messed up situation example.

Expected behavior
It's pretty obvious that married players should not get suddenly unmarried. But I'm guessing it's due to database linking issues.

Other information (e.g. detailed explanation, related issues, suggestions how to fix, links for us to have context, screenshots, etc.)
You are probably going to require some database data, or other data. Just request it and I'll gladly hand it over.

commented

Could you please provide me with a dump (including the create statement) for the players and partners table.
Also please tell me the name of the players.

For situation 2:
Do you by any chance know if that behavior happened when switching to an empty server?

commented

What would the command be for that? I know how to export the whole table if that where enough. Allthough then you'd have to import it to check the contents.

Situation 2:
Yes, the server was probably empty at that moment. And maybe it stopped occuring once someone else joined.

commented

Export should be fine.

Ok, I will look into it.

commented

Email sent.
Edit: Realized email was too large. Resending through wetransfer.
Edit2: There, sent through wetransfer.

commented

You have a couple players that are married to more than one partner, but the AllowMultiplePartners option is turned off, this could be part of the problem.
You should be able to get rid of them with this command (restart the BungeeCord server after executing it):

DELETE FROM `Hub`.`marry_partners` WHERE `marry_id`=217 or `marry_id`=222 or `marry_id`= 237 or `marry_id`=261 or `marry_id`=262 or `marry_id`=263;

The players are:
RONNY505 with Draktharr and Morokiane
BlacKer0 with DhaosX and Emmanuel
2001aht_ with NoSoy2001 and Neiless

Does your situation 1 affect other players than these?

commented

That includes the two players affected by the case I mentioned. However, this has happened with the current plugin setup and configuration.

I can fix it as you say, but I think it will happen again, since Neiless and 2001aht_ married between yesterday and today, and I did no changes to the plugin for about a week.

Edit: Applied the command.

commented

Do you know when 2001aht_ divorced NoSoy2001 and if that happened on the same server as the wedding with Neiless?

commented

Yes, it (close to 100% sure) happened on the same server. And NoSoy2001 Is the secondary account of 2001aht_ which I mentioned in case 1.

Edit: Ah, this divorce and marriage operation happened some time between today and yesterday.

commented

Thanks for the details, I will look into it.

commented

Hey. So I've been getting some reports lately of people being married, and then not married, between server restarts.

Example: I'm married now, the server restarts, I'm no longer married, server restarts again, I'm married again. Sometimes it gets pretty random.

commented

I did a lot of testing over the last month and while I was not able to reproduce the problem of the marriage not being deleted from the database, I have found that disabling UUIDs like in your config sometimes causes unexpected behavior (like the one you have just described). I would recommend that you try to enable the UseUUIDs option.

commented

Applied changes, let's see how it goes.