zhang-arvin opened a new pull request, #4504:
URL: https://github.com/apache/streampark/pull/4504

   ## What problem does this PR solve?
   
   Fixes #4338: When manually triggering a savepoint, the release status 
remains in WAITING/SAVEPOINTING state even after the savepoint completes.
   
   ## Root Cause Analysis
   
   1. **`DeflaterUtils.unzipString()`** throws `IllegalArgumentException` when 
`flinkConf` is not valid Base64 (e.g., stored as plain file path instead of 
compressed content). This exception propagates up through `saveSavepoint()` → 
`save()` → `expire()` → `getChkNumRetainedFromFlinkEnv()` → 
`convertFlinkYamlAsMap()` → `unzipString()`.
   
   2. **`FlinkCheckpointProcessor.process()`** does not clean the 
`SAVEPOINT_CACHE` when `saveSavepoint()` throws an exception. This causes the 
`FlinkAppHttpWatcher` to keep setting the option state to `SAVEPOINTING` on 
every poll cycle, since the cache entry is never removed.
   
   ## Changes
   
   1. **`DeflaterUtils.unzipString()`**: Catch `IllegalArgumentException` from 
`Base64.getDecoder().decode()` and return `null` gracefully, similar to the 
existing `DataFormatException` handling.
   
   2. **`FlinkCheckpointProcessor.process()`**: Wrap `saveSavepoint()` in 
try-finally to ensure `cleanSavepoint()` is always called, preventing the 
`SAVEPOINT_CACHE` from leaking.
   
   3. **`FlinkEnv.convertFlinkYamlAsMap()` and `getFlinkConfig()`**: Handle 
null return from `unzipString()` gracefully, returning empty map/properties.
   
   ## Verification
   
   - [x] Manual code review of the savepoint trigger flow
   - [x] Confirmed the fix addresses the root cause described in #4338


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to