Commit Graph

9 Commits

Author SHA1 Message Date
Spigot
123fcc5f33 Add warning when null chunk buffers are encountered - most likely due to the orebfuscator plugin.
By: md_5 <git@md-5.net>
2014-02-01 18:07:22 +11:00
Spigot
615f117878 In short, there isn't actually anything wrong with the async chunk compressor, it just accidentally caused console logging of errors which were previously ignored.
This commit restores that behaviour

You may be asking yourself why we are completely ignoring any errors which come this far down the pipeline.
The answer is quite simple:
Mojang did it
The default Mojang pipeline doesn't have any ChannelOutboundHandlerAdapter or similar instances, and thus nothing to handle exceptionCaught
So when a channel.write() or channel.flush() fails, the error message is actually just passed straight to the future provided.
It is then subsequently discarded, the channel closed, and no one except the user was any the wiser it actually happened!
Unfortunately for us, the default exceptionCaught in this class sends a blaring warning to the server admins indicating that it couldn't send a packet to a disconnected user!
We don't care about these warnings, if we did something wrong to disconnect the user, it is already logged in the proper location, as are broken sockets
tl;dr no need to blare warnings on each write to a broken socket

By: md_5 <git@md-5.net>
2014-02-01 17:53:32 +11:00
Spigot
f9de62bfdb Move exception logging to method body so we don't end up logging all outbound exceptions, which other plugins (cough ProtocolLib) may or may not be causing.
Also rumours this patch causes the server to break with ProtocolLib installed.
@aadnk

By: md_5 <git@md-5.net>
2014-01-30 16:02:25 +11:00
Spigot
994015de83 Show full stack trace for errors during chunk caching/compression
By: md_5 <git@md-5.net>
2014-01-30 06:58:37 +11:00
Spigot
c3ff978d51 Use a crc32 of all the blocks in the chunk as our hash key. This is much more unique.
By: md_5 <git@md-5.net>
2014-01-29 12:51:20 +11:00
Spigot
87a0f66c62 Fix unit tests
By: md_5 <git@md-5.net>
2014-01-29 09:08:29 +11:00
Spigot
05f0f87d55 [Experimental] - Enable compressed bulk chunk cache.
Sort chunks a final time before sending. This gives the advantage that chunks will load as close to the player as they possibly can, and then move out, as well as increase the cache hit rate when using smaller bulk chunk limits such as the default of 5.

By: md_5 <git@md-5.net>
2014-01-29 09:04:51 +11:00
Spigot
6fd6437d95 Use simpler iterator
By: md_5 <git@md-5.net>
2014-01-28 21:46:15 +11:00
Spigot
3f8acf3f09 Implement a compressed chunk cache. This still needs a lot of work to figure out a good mechanism for looking up previous chunks, however at the moment when coupled with a high bulk chunk limit, it can be effective for solving lag issues.
By: md_5 <git@md-5.net>
2014-01-28 21:45:06 +11:00