Commit graph

9 Commits

Autor SHA1 Nachricht Datum
md_5
61a227c8c3 Add warning when null chunk buffers are encountered - most likely due to the orebfuscator plugin. 2014-02-01 18:07:22 +11:00
md_5
161e853450 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
2014-02-01 17:53:32 +11:00
md_5
564ebde3ad 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
2014-01-30 16:02:25 +11:00
md_5
7bd5666ee2 Show full stack trace for errors during chunk caching/compression 2014-01-30 06:58:37 +11:00
md_5
a780739071 Use a crc32 of all the blocks in the chunk as our hash key. This is much more unique. 2014-01-29 12:51:20 +11:00
md_5
911b500845 Fix unit tests 2014-01-29 09:08:29 +11:00
md_5
feacfb991d [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.
2014-01-29 09:04:51 +11:00
md_5
23615e1c9f Use simpler iterator 2014-01-29 08:47:29 +11:00
md_5
202b1fd11d 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. 2014-01-29 08:47:29 +11:00