Skip to content

Conversation

@tpoliaw
Copy link
Contributor

@tpoliaw tpoliaw commented Dec 12, 2025

When the tiled writer subscribes to the run_engine, another callback
subscribes to the task worker to remove the writer at the end of the
plan/task. This subscriber should also be removed at the end of the
task.

To avoid creating a third subscriber and the same issue again, rely on
the unsubscribe handle created after the callback is defined being
available in the closure when it runs. There is a very slight race
condition here if the task complete event is received before the
subscribe method returns but until it happens we'll assume it's
unlikely.

@tpoliaw tpoliaw requested a review from a team as a code owner December 12, 2025 15:39
@codecov
Copy link

codecov bot commented Dec 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.97%. Comparing base (18489bd) to head (f285529).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1301      +/-   ##
==========================================
+ Coverage   94.74%   94.97%   +0.22%     
==========================================
  Files          42       42              
  Lines        2741     2744       +3     
==========================================
+ Hits         2597     2606       +9     
+ Misses        144      138       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tpoliaw tpoliaw changed the title Unsubscribe the callback that unsubscribes the tiled writer fix: Unsubscribe the tiled writer unsubscriber Dec 12, 2025
When the tiled writer subscribes to the run_engine, another callback
subscribes to the task worker to remove the writer at the end of the
plan/task. This subscriber should also be removed at the end of the
task.

To avoid creating a third subscriber and the same issue again, rely on
the unsubscribe handle created after the callback is defined being
available in the closure when it runs. There is a very slight race
condition here if the task complete event is received before the
subscribe method returns but until it happens we'll assume it's
unlikely.
@tpoliaw tpoliaw force-pushed the remove-tiled-remover branch from 97e4314 to f285529 Compare December 12, 2025 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants