Hello everyone, I am working on minimizing duplic...
# troubleshooting
p
Hello everyone, I am working on minimizing duplicate data processing when task managers restart due to node consolidation or any other reason, including automatic job restarts. To achieve this, I am leveraging savepoint creation in the preStopHook. So far, I have been able to use savepoints for job restarts during suspension. However, when only the task manager restarts, the system is not using the savepoint. Instead, it is searching for a checkpoint. Currently I am using s3 for creating checkpoints. Also I can see that savepoint is created when task manager only stops, but it doesn't recover from savepoint. Is there any configuration I might be missing to ensure that the task manager uses the savepoint during a restart? current config :=
Copy code
execution.savepoint.path: "s3p:/pathtosavepoints/"
    state.checkpoints.prefer-savepoint-for-recovery: "true"
this is preStop hook
Copy code
lifecycle:
            preStop:
              exec:
                command:
                  - "/bin/sh"
                  - "-c"
                  - |
                    job_id=$(/opt/flink/bin/flink list | grep "RUNNING" | awk '{print $4}') && \
                    [ -n "$job_id" ] && /opt/flink/bin/flink savepoint $job_id s3p://path-to-savepoint/ && \
                    echo "Savepoint triggered for job $job_id"
job config
Copy code
upgradeMode: savepoint
    allowNonRestoredState: true
    savePointOnCancel: true
Do I need to set some config for task manager as well . Please help here