This PR ensures that we always add a payload ID to the history table for events created by the orchestration. Previously, by default, these payload IDs were tracked temporarily in the NewEvents and NewTasks table, but then would get deleted, leaving behind orphan payloads in the database. A previous PR cleaned up the orphan payloads (adding to the I/O cost of activity execution), but this PR reverts that change and does what I preferred to do, which is keep them there but ensure they are linked from the history table.
This also fixes an issue related to duplicate payloads being saved when input tracking is enabled on the TaskHubWorker.
Resolves #85 Resolves #84
This PR ensures that we always add a payload ID to the history table for events created by the orchestration. Previously, by default, these payload IDs were tracked temporarily in the NewEvents and NewTasks table, but then would get deleted, leaving behind orphan payloads in the database. A previous PR cleaned up the orphan payloads (adding to the I/O cost of activity execution), but this PR reverts that change and does what I preferred to do, which is keep them there but ensure they are linked from the history table.
This also fixes an issue related to duplicate payloads being saved when input tracking is enabled on the TaskHubWorker.