Repository navigation
Deliver upstream feedback to remote tasks and stop spurious "No remote destination available" warnings - #9175
Conversation
|
Hi @ErnestasVaiciukeviciusAdform thanks a lot for reporting and addressing this bug! If you have bandwidth, can you execute with your changes this topology in a two supervisors cluster with flag on/off? |
Sure. Also for comparison on unmodified 3.1.0: |
|
Hi @ErnestasVaiciukeviciusAdform thanks! Reducing p99 latency of 4s(~30%) is a lot, it requires additional validation. |
GGraziadei
left a comment
There was a problem hiding this comment.
A few requests before merging:
- Please rebase on
master - Document the connection fan-in in
docs/Performance.md(the only place describing the flag) and/or theTOPOLOGY_UPSTREAM_FEEDBACK_ENABLEjavadoc: with the flag on, every worker hosting a user bolt now opens a Netty client connection to every worker hosting a task of its upstream components - A few small things on the tests, inline.
…e destination available" warnings When topology.upstream.feedback.enable is true, feedback tuples are routed directly to upstream (source) component tasks, but a worker's routable remote destinations (cachedTaskToNodePort) and connections are built only from outboundTasks, which contained just the downstream-target components of local tasks. Feedback recipients were therefore missing, so TransferDrainer logged "No remote destination available for task" and silently dropped the tuple; cross-worker feedback was never delivered. Whether the warning appeared depended on task placement, which was misleading. Include the non-system source (upstream) components of local tasks in outboundTasks when feedback is enabled, mirroring Executor.computeUpstreamTaskIds at worker granularity, so feedback recipients are routable and connected. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…cker task behavior
…d add feedback configuration tests
…back to WorkerOutboundTasksTest
c18e109 to
0f60ebe
Compare
Checked all 4 variations (on code rebased on master).
240,4,12,12,28300,471,1,2060,1880,34,14326.030,14326.030
240,4,12,12,45760,762,1,3020,3040,50,9497.082,9497.082
240,4,12,12,30100,501,1,1880,2020,31,14314.659,14314.659 -c topology.executor.receive.control.queue.enable=true -c topology.upstream.feedback.enable=true 240,4,12,12,47820,797,1,3080,3120,51,8984.315,8984.315 |
… implementations and simplify method signatures
…ead and security implications in Config.java and Performance.md
Addressed all the points. |
What is the purpose of the change
To fix #9174.
When
topology.upstream.feedback.enable=true, workers flood their logs withWARN o.a.s.utils.TransferDrainer - No remote destination available for task <id>,and — more importantly — the upstream-feedback tuples that trigger those warnings are
dropped. Upstream feedback is therefore only delivered to tasks on the same
worker; feedback destined for upstream tasks on other workers never arrives.
Root cause. Upstream feedback is routed directly to upstream (source) component task ids
via
Task.sendUnanchoredFeedback, bypassing stream grouping(
Executor.sendUpstreamFeedback/Executor.computeUpstreamTaskIds). But a worker's routableremote destinations (
WorkerState.cachedTaskToNodePort) and its connections are built onlyfrom
outboundTasks, whichWorkerState.workerOutboundTasks()derives purely from thedownstream-target components of local tasks.
addUpstreamFeedbackdeclaresFEEDBACK_STREAM_IDonly as an output stream (no grouping/input edge), so feedback recipientsare never added to
outboundTasks. For a remote recipient,TransferDrainer.sendfinds nonode, logs the warning, and drops the tuple.
Why it looks intermittent / misleading.
outboundTasksmembership is decided percomponent: if a component is a downstream target of any local task, all of its tasks become
routable. So a worker emits no warning for feedback to upstream component
XwheneverXalso happens to be a downstream target of some co-located task — the feedback rides the
existing connection and looks healthy. The same feedback edge warns and drops on a worker that
hosts upstream tasks of
Xbut none ofX's downstream consumers. Consequently "nowarnings" does not mean feedback is delivered; it only reflects task placement (e.g. the
warnings vanish entirely if every worker happens to host a task of every component), which can
mislead operators into thinking the feature works.
Fix. When upstream feedback is enabled, also include the non-system source (upstream)
components of the locally-hosted components when computing
outboundTasks, mirroringExecutor.computeUpstreamTaskIds()at worker granularity. This makes every feedback recipient(bolt or spout) a routable remote destination with a connection, so feedback is delivered
correctly and the spurious warning disappears — independent of task placement. The change is
confined to
WorkerState.workerOutboundTasks()and only takes effect whentopology.upstream.feedback.enable=true(off by default).How was the change tested
WorkerOutboundTasksTest(storm-client) covering aspout -> bolt1 -> bolt2topology:bolt2task,
bolt1is already routable as the spout's downstream target even with feedback off,documenting that absence of warnings does not imply correct delivery.
mvn -pl storm-client -am install -DskipTests— BUILD SUCCESSmvn -pl storm-client test -Dtest=WorkerOutboundTasksTest— Tests run: 3, Failures: 0, Errors: 0mvn -pl storm-client test -Dtest=WorkerStateTest(existing tests, no regression) — Tests run: 3, Failures: 0, Errors: 0mvn -pl storm-client checkstyle:check@validate— 0 Checkstyle violations