Right now, if the tick time for any particular tick exceeds a configured amount, the server will report itself as crashed. However, certain plugins, such as world modification plugins, might need over a minute to complete a contiguous operation. In cases like these, the server watchdog would halt the server even though the server didn't really crash. It's simply taking a while to perform an operation.
Therefore I think there should be a way for a plugin to feed the watchdog and indicate that the server is still healthy and should continue to run, despite there being no ticks.
What do you guys think? Is the use case strong enough for something of this level of (in)sanity?
+1 for the title
A plugin should never ever stall the main thread which is the only one the ServerWatchdog cares about.
If your operation takes that amount of time, you need to figure out a mechanism of putting that off thread.
@Zidane which has a big potential for creating concurrency issues
@kinggoesgaming
There are easy strategies for doing thread interchange. @gravityfox knows how.
I do in fact know how. But there are certain operations that involve the main thread that simply cannot be broken up (Read: Pasting 20 million blocks from a schematic that has lots of notification sensitive blocks, like torches) Granted I can cancel all block notifications in the pasting area, but I don't know if I can renotify the blocks later on.
Simply put creates complications where none are needed
@gravityfox I think your main problem is that you shouldn't be trying to paste all 20 million blocks in one go.
Maybe, but i can think of a few cases where breaking up a giant schematic paste wouldn't work quite right.
Closing this as I can never see why pasting that many blocks would be done in one go. That should be broken up and then blocks notified at the end.
Most helpful comment
+1 for the title