-
Notifications
You must be signed in to change notification settings - Fork 602
Closed
Labels
good first issueGood for newcomersGood for newcomers
Description
Problem Description
Java's native Executors.new*ThreadPool() methods lack visibility into thread pool workloads. Missing queue size monitoring makes it hard to:
- Detect thread pool congestion (e.g., blocking I/O tasks)
- Diagnose "silent hangs" during incidents
- Optimize pool sizing
Our utility class com.automq.stream.utils.Threads provides monitored alternatives (e.g., newFixedThreadPoolWithMonitor) that log queue sizes to s3stream-threads.log. However, AutoMQ code still contains unsafe native pool initializations.
Required Changes
- Replace all native pool creations (
Executors.newFixedThreadPool,newCachedThreadPool, etc.) in AutoMQ code with matchingThreadsmethods - Extend
Threadsclass if needed:- Add overloaded methods for parameter variations (e.g., custom thread factories)
- Keep method signatures compatible with native
Executorspatterns
- Ensure no changes are made to original Apache Kafka code paths
Scope Guidance
Focus on code in these patterns:
- Located in
com.automq.*packages - Clearly identified as AutoMQ-specific additions (search for "AutoMQ inject" and "AutoMQ for Kafka inject")
- Files with the
AutoMQ HK Limitedheader
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers