rob-9 opened a new pull request, #884: URL: https://github.com/apache/flink-agents/pull/884
Addresses #691 ### Purpose of change `KafkaActionStateStore.pruneState()` only removed entries from the in-memory cache. the underlying Kafka topic was never updated, so: 1. the topic grew unbounded, meaning Kafka log compaction had no tombstones to trigger key deletion 2. after a restart, `rebuildState()` replayed pruned records back into memory, resurrecting state that should have been discarded This PR sends `null`-valued records to the state topic during pruning, and updates `rebuildState()` to skip tombstoned keys during replay instead of inserting them into the cache. Also fixes an NPE in the error-logging path that called `record.value().toString()` on a null value. ### Tests `mvn --batch-mode --no-transfer-progress -pl runtime -am -Dtest=KafkaActionStateStoreTest test` - `testPruneState` verifies tombstones are produced and in-memory entries are evicted - `testPruneStateSendsTombstonesWithCorrectKeys` asserts exact composite keys on produced tombstones - `testPruneStateNoMatchingKeys` verifies no tombstones sent when no keys match - `testPruneStateWithNullProducer` verifies graceful degradation when producer is null ### API No public API changes. ### Documentation - [x] `doc-not-needed` -- 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]
