Skip to content

Commit d0b5a34

Browse files
committed
fix(jsonata): restore maxDepth default to 1000 to avoid breaking change
The 4 MB eval thread is the actual fix for the StackOverflowError on Windows workers. Lowering maxDepth had no effect on the crash, which was driven by Frame.lookup() scope-chain depth, not user-defined function recursion. maxDepth=50 was an unnecessary breaking change.
1 parent f94dd17 commit d0b5a34

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

  • plugin-transform-json/src/main/java/io/kestra/plugin/transform/jsonata

plugin-transform-json/src/main/java/io/kestra/plugin/transform/jsonata/Transform.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,14 @@
3737
public abstract class Transform<T extends Output> extends Task implements JSONataInterface, RunnableTask<T> {
3838

3939
private static final ObjectMapper MAPPER = JacksonMapper.ofJson();
40-
// 4 MB: fits default maxDepth=50 × ~8 JVM frames/level with large headroom.
41-
// Also isolates StackOverflowError inside the eval thread so the worker thread never crashes.
40+
// 4 MB: isolates StackOverflowError inside the eval thread so the worker thread never crashes.
4241
private static final long EVAL_THREAD_STACK_SIZE = 4 * 1024 * 1024;
4342

4443
@PluginProperty(language = MonacoLanguages.JAVASCRIPT, group = "advanced")
4544
private Property<String> expression;
4645

47-
// Default 50: each JSONata recursion level pushes ~8 JVM frames; 256 KB worker stacks
48-
// (~300 usable frames) overflow before maxDepth fires at 200. 50 × 8 = 400 frames — safe.
49-
// Users needing deeper recursion should increase both this value and the JVM stack size.
5046
@Builder.Default
51-
private Property<Integer> maxDepth = Property.ofValue(50);
47+
private Property<Integer> maxDepth = Property.ofValue(1000);
5248

5349
@Getter(AccessLevel.PRIVATE)
5450
private Jsonata parsedExpression;

0 commit comments

Comments
 (0)