Per the discussion in the ML, detail can be found , the teardown of DoFns should be supported in the portability framework. It happens at two places:
1) Upon the control service termination
2) Tear down the unused DoFns periodically
The aim of this JIRA is to add support for tear down the unused DoFns periodically in Python SDK harness.