ServerSync

ServerSync

48.5k Downloads

Feature Request: Skip unchanged configs

cking opened this issue ยท 29 comments

commented

Serversync Version:

3.1.0

Minecraft Version:

1.15.2

Feature Request:

It would be nice if the server sends a checksum of all config files before syncing them, the client then could compare the remote hashsum with the local one and skip downloading/syncing the file in question.

  • Included in alpha release
  • Included in full release
commented

Are you meaning directory hashing?

The current sync process sends a hash of the file to the client for them to compare against their file, it only sends the actual file if that comparison fails.

Sounds like its probably a bug if you are getting unchanged config files sent to clients.

commented

Notably the config include list has an issue at the moment where it will always replace the files in said list.

commented

I see a suspicious bit of code here: https://github.com/superzanti/ServerSync/blob/master/src/main/java/com/superzanti/serversync/server/ServerWorker.java#L141

Looks like if the client is doing nothing but replying with "I already have the file" for long enough the server will time it out as it only resets the timeout in the transferFile method.

commented

To address the original issue, I'll look into ways of speeding up the comparison process.

Created #160 to track the client being timed out by the server.

commented

It is related to configs and mods as far as I know.

I have a player on my server that is sitting behind a 4G router with a slower/unstable connection, and serversync is always trying to sync everything.

For him, I am adding a skip flag to my launcher ( https://github.com/mcz0ne/launcher ) so it doesnt invoke server sync.

commented

Hmm, is it sending full files or just the hash for each file?

commented

https://just.awoo.fun/ups/200319195734391.mp4

thats what she send me yesterday

commented

Interesting, I am seeing a flat crash when trying to sync a second time. Do you have server logs for the recent connections?

commented

https://zerotsu.z0ne.moe/share/serversync-connection.log

this is the connection from said person.
i could upload all serversync logs as well if you need them

commented

Hmm, yeah maybe all of them would be good. That one appears to be a successful sync.

commented

https://zerotsu.z0ne.moe/share/serversync.tar.bz2

there are all serversync* log files in the log folder.

i am running as a seperate application, so it should not insert something into the minecraft/forge log files, right?

commented

Yep, serversync keeps all its own logs unless it is being loaded by forge.

commented

Seems to be falling over during the file sync, hard to tell where exactly though.

commented

Could you send me the latest log from 100-101 please. I get the feeling that the server is timing out the client before it manages to finish.

Also does seem to be taking a rather long time per file to resolve if it is up to date or not.

commented

i sent you everything i have. if you tell me where to find more, then sure, i can send more
https://zerotsu.z0ne.moe/share/seversync-conn-101.log

there is nothing more then that in the log file

commented

I let the connection time out which would have overwritten that particular log.

commented

What happens when you try to sync to the server multiple times on your end?

commented

its always updating every config file. which is annoyingly slow.

ill be posting the logs once it runs through it a second time.

commented

Version 3.2+ should fix the always updating configs issue.

commented

PS: this was all 3.1.0, saw the update just now

commented

Here is the newest connection log of them

Client: https://zerotsu.z0ne.moe/share/ssc-20200322.log
Server: https://zerotsu.z0ne.moe/share/sss-20200322.log

from the client log, you can additionally observe that its deleting mods that shouldnt be deleted as well.
the server version is 3.2.0, client version 3.1.0 - but that shouldnt make a big difference IMO.
i hope this helps.

the server log is a bit corrupted bc they started sync process while i was backing the log up. would be nice if serversync would keep the latest 3 logs or so.

commented

I'm thinking of making a second sync mode that server admins can choose if they wish.

General premise:

  1. Send entire manifest to client (more memory use, less socket traffic)
  2. Client side processing of which files need updating
  3. Request specific files from the server.

This should speed up the sync process when you don't need a full sync significantly.

commented

that would be great IMO :)

commented

Hello, i'm facing a similar problem with 3.2.0.

Here are my logs : https://pastebin.com/s02UTieQ

commented

Created #163 to track files being deleted. This tickets focus is speeding up the checking for file changes.

commented

@halfama Is the issue you are seeing long sync times or files being deleted that shouldn't be?

commented

Closing this as v4 has released.

Feel free to open new issues if problems persist.

commented

Early access available for manifest style sync available in the 3.7.0 versions
https://github.com/rheimus/ServerSync/releases