{"record":{"id":"39df2dc94d0a4204","repo":"apache/seatunnel","slug":"can-not-sync-pipeline-owned-slot-profiles-with-ima","errorCode":null,"errorMessage":"Can not sync pipeline owned slot profiles with IMap","messagePattern":"Can not sync pipeline owned slot profiles with IMap","errorType":"exception","errorClass":"SeaTunnelEngineException","httpStatus":null,"severity":"error","filePath":"seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/master/JobMaster.java","lineNumber":1556,"sourceCode":"        }\n    }\n\n    public void setOwnedSlotProfiles(\n            @NonNull PipelineLocation pipelineLocation,\n            @NonNull Map<TaskGroupLocation, SlotProfile> pipelineOwnedSlotProfiles) {\n        ownedSlotProfilesIMap.put(pipelineLocation, pipelineOwnedSlotProfiles);\n        try {\n            RetryUtils.retryWithException(\n                    () ->\n                            pipelineOwnedSlotProfiles.equals(\n                                    ownedSlotProfilesIMap.get(pipelineLocation)),\n                    new RetryUtils.RetryMaterial(\n                            Constant.OPERATION_RETRY_TIME,\n                            true,\n                            exception -> exception instanceof NullPointerException && isRunning,\n                            Constant.OPERATION_RETRY_SLEEP));\n        } catch (Exception e) {\n            throw new SeaTunnelEngineException(\n                    \"Can not sync pipeline owned slot profiles with IMap\", e);\n        }\n    }\n\n    public SlotProfile getOwnedSlotProfiles(@NonNull TaskGroupLocation taskGroupLocation) {\n        Map<TaskGroupLocation, SlotProfile> taskGroupLocationSlotProfileMap =\n                ownedSlotProfilesIMap.get(\n                        new PipelineLocation(\n                                taskGroupLocation.getJobId(), taskGroupLocation.getPipelineId()));\n        if (taskGroupLocationSlotProfileMap == null) {\n            return null;\n        }\n\n        return taskGroupLocationSlotProfileMap.get(taskGroupLocation);\n    }\n\n    public ExecutorService getExecutorService() {\n        return executorService;","sourceCodeStart":1538,"sourceCodeEnd":1574,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/master/JobMaster.java#L1538-L1574","documentation":"JobMaster.syncPipelineOwnedSlotProfiles retries the IMap update of a pipeline's owned slot profiles using RetryUtils, tolerating only transient NullPointerExceptions while the job is running. If all retries (OPERATION_RETRY_TIME) are exhausted, it wraps the last exception in SeaTunnelEngineException 'Can not sync pipeline owned slot profiles with IMap'. The engine cannot persist which slots each pipeline owns, breaking later slot lookups.","triggerScenarios":"Writing owned slot profiles to the IMap repeatedly fails (NPE while isRunning, or another exception) until the retry budget is exhausted - e.g. IMap unavailability, serialization failures, or job being shut down concurrently during initialization.","commonSituations":"Cluster under heavy load or during master failover causing IMap operations to fail; job cancelled/stopped mid-initialization making isRunning false so NPE retries stop helping; Hazelcast instance issues (partition migration, connectivity).","solutions":["Check the wrapped cause ('e') in the exception logs for the real IMap/serialization failure and fix it.","Retry the job; transient IMap/partition issues during cluster churn often resolve after the cluster stabilizes.","Verify master node health and Hazelcast connectivity; restart the master if the IMap service is stuck.","If it recurs during job stop, avoid cancelling jobs while they are still initializing slot profiles."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    submitJob(conf);\n} catch (SeaTunnelEngineException e) {\n    if (e.getMessage().contains(\"Can not sync pipeline owned slot profiles\")) {\n        log.error(\"slot sync failed; cause:\", e.getCause());\n        // check cluster health before retrying\n    }\n    throw e;\n}","preventionTips":["Keep the master node healthy; monitor Hazelcast IMap health and partition migrations.","Avoid cancelling jobs during initialization while slot profiles are being synced.","Investigate the wrapped cause immediately - it names the real IMap failure."],"tags":["imapping","slot-profile","retry-exhausted","jobmaster"],"backgroundTag":"internal-invariant-violation","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}