oscerd opened a new pull request, #23125: URL: https://github.com/apache/camel/pull/23125
## Summary Fixes memory leak in camel-docling component where pending async conversion tasks accumulate indefinitely in the shared `pendingAsyncTasks` map. ## Changes - **AsyncTaskEntry**: New wrapper class that tracks `CompletableFuture` with creation timestamp - **asyncTaskTtl**: New configuration option (default 86400000ms / 24 hours) - **Scheduled cleanup**: Background task runs every 10% of TTL (minimum 1 minute) to evict expired entries - **Logging**: DEBUG-level logging for evictions with task ID and age - **Documentation**: Updated `docling-component.adoc` with new configuration option - **Tests**: Added `DoclingAsyncTaskTtlTest` with three test scenarios ## Risk Assessment **Low risk** - The change is additive and backward compatible: - Existing behavior unchanged (tasks still tracked and consumed normally) - New cleanup only removes entries that would never be consumed - Default TTL (24 hours) is conservative for typical use cases - Cleanup runs in background thread, no impact on processing ## Testing - Unit tests verify TTL eviction after configured timeout - Unit tests verify tasks not evicted before TTL expires - Unit tests verify multiple tasks evicted correctly - Full reactor build passed (26 minutes) ## Related - JIRA: https://issues.apache.org/jira/browse/CAMEL-23459 - Component: camel-docling (async conversion feature) --- _Bob on behalf of Andrea Cosentino_ -- 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]
