Purushottam Sinha created FLINK-40550:
-----------------------------------------

             Summary: Kubernetes Operator: documented reconcile.parallelism: -1 
crashes operator at startup
                 Key: FLINK-40550
                 URL: https://issues.apache.org/jira/browse/FLINK-40550
             Project: Flink
          Issue Type: Bug
          Components: Kubernetes Operator
            Reporter: Purushottam Sinha


Problem
Setting kubernetes.operator.reconcile.parallelism: -1 — documented as the 
"unbounded/infinite" value — crashes the operator during construction, so it 
never starts and reconciles nothing. Reproduces on the released 1.15.0 image, 
not just main.

Evidence
- FlinkResourceContextFactory ctor feeds the raw value to 
Executors.newFixedThreadPool, which throws on a negative size; 
FlinkOperator.java:154 already special-cases -1 with newCachedThreadPool, the 
factory doesn't. Built in the FlinkOperator ctor, so main() throws before run().
- Released ghcr.io/apache/flink-kubernetes-operator:79d730b (1.15.0): 
IllegalArgumentException at FlinkResourceContextFactory:86, pod stuck 0/1.
- Control (same image/chart): parallelism=5 boots 1/1, only -1 crashes — not a 
config gap. Docs advertise -1 as unbounded (internals/controllers.md:69, 
startup.md:236).

Proposed fix
- In the factory ctor: parallelism == -1 ? Executors.newCachedThreadPool(tf) : 
Executors.newFixedThreadPool(parallelism, tf). Positive-value path unchanged.

Acceptance
- Constructing the factory with reconcile.parallelism = -1 does not throw (unit 
test, red before / green after).
- Operator deployed with -1 reaches 1/1 Ready.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to