Contain failed placements and let engine failures end the chunk

Placement code caught Throwable and logged it, so a closed session, a stopping executor or an OOM inside a placement left a half-built chunk that was then persisted. A classifier in the api separates those failures from content failures: the first are rethrown, the second are skipped with one rate-limited warning per kind, subject and failure type.

Upstream: 54f3595ba ebe4aa1e4 7b38f7584 f4f7e92a4 8cf9e01d9
This commit is contained in:
piexel committed 2026-11-10 01:04:37 +01:00
1 parent fc5c6ce0ab
commit de1c6e887f
13 files changed
+318 -22

No files matched your search

@@ -1,6 +1,8 @@
package art.arcane.iris.engine.framework;
public class GenerationSessionException extends WrongEngineBroException {
import com.volmit.generation.EngineFailure;
public class GenerationSessionException extends WrongEngineBroException implements EngineFailure {
private final boolean expectedTeardown;
public GenerationSessionException(String message) {
@@ -24,6 +24,7 @@ import art.arcane.iris.engine.object.noise.IrisGeneratorStyle;
import art.arcane.iris.spi.IrisLogging;
import art.arcane.iris.util.project.matter.TileWrapper;
import com.google.common.collect.ImmutableList;
import com.volmit.generation.GenerationFailures;
import art.arcane.iris.core.IrisSettings;
import art.arcane.iris.core.link.Identifier;
import art.arcane.iris.core.tools.WorldMaintenance;
@@ -963,6 +964,7 @@ public class MantleWriter implements IObjectPlacer, AutoCloseable {
try {
setData(pos.getX(), pos.getY(), pos.getZ(), data);
} catch (Throwable e) {
GenerationFailures.rethrowEngineFailure(e);
// Reached per position while an object writes past the edge of the writer window, which is
// how a large object is clipped. Nothing here is actionable from outside the engine.
IrisLogging.debug("No set? " + data.toString() + " for " + pos.toString());