ServerSync

ServerSync

48.5k Downloads

Sometimes, older mods won't be removed / synced

TomberWolf opened this issue ยท 9 comments

commented

Serversync Version:

serversync-2.6.15

Minecraft Version:

1.10.2

Issue:

In some cases, older mods won't be removed.

Example:
CustomNPCs_1.10.2(15may17).jar
CustomNPCs_1.10.2(21jul17).jar

I removed CustomNPCs_1.10.2(15may14).jar from the server's mod folder but serversync did not removed it from the client.
So the client has a duplicate mod which has to be removed manually.

commented

Indeed, SS atm does not gracefully handle duplicate mod entries.

There is some rudimentary warning functionality for duplicates in the latest source code. I am undecided as of the moment how to handle dupes.

commented

code end of the file if you are interested

commented

But it works fine for the most other files.

commented

Yeah @rheimus a fix would be greatly appreciated XD. 5 Times I have been in situations where I thought a mod was bugging out only to find out I needed to pay attention.

I think I have an idea ... Okay so here would be how to deal with and check duplicates

  1. Create a log of file names, directories and file timestamps (Server and Client)
  • Serversync determines client is missing (Ping-1.0b.jar) and sends (Ping-1.0b.jar to client)
  • Serversync notices that Server has (Test.jar with timestamp 8/5/2106 at12:00) but client has (Test.jar with timestamp 8/5/2106 at 08:00) so serversync Sends Correct Jar to mirror server and deletes client jar release.
  1. Profit.
commented

The alpha build of 2.6.16 has some basic duplicate warning in it, better than nothing I suppose.

Have been mulling over various ideas for how to gracefully handle duplicates, always useful to add more to the list.

In the end what we are looking for is that the client mirrors the server, minus exception rules set up by either side.

It's probably more to do with fixing the delete phase which at the moment rolls over the clients directory and pings the server asking if the file is supposed to be there.

I get the feeling this doesn't need to be there as the server has already sent the client a list of files that it has in the initial check to see if an update is needed, we should be able to use that list to remove any extraneous files (minus ignore rules).

Really need to have a decent design session and work out a cleaner implementation ๐Ÿ˜„.

commented

@TomberWolf @P3rf3ctXZer0
Apologies for the terrible tardy update, have been pretty full on release mode at work.

I have made some changes to the deletion phase so that it just mirrors the server state (minus client ignore rules).
This may well solve the duplicate issue present here, have not had the chance to test this myself yet.

There is a pre-release available with these changes.

commented

As always I am happy to test it. @rheimus

commented

@rheimus this is working perfect I no longer get any errors and the mod is extremely fast ^_^

commented

@P3rf3ctXZer0 Sweet, thanks for testing it out.

I'll do some further odds & ends testing and rustle up a proper release.