Fix writtenIntermediateBytes metric to capture correct intermediate w…#21626
Fix writtenIntermediateBytes metric to capture correct intermediate w…#21626jaystarshot merged 1 commit intoprestodb:masterfrom
Conversation
47e8b39 to
ed8638a
Compare
There was a problem hiding this comment.
Clone of the above function with a filter on the temporaryTableWriters
ed8638a to
1184a83
Compare
There was a problem hiding this comment.
LGTM. I also briefly checked the code to make sure that the "outputTableWriterFragment" variable is only used for accounting purpose.
Can you maybe add a comment for the "outputTableWriterFragment" member in "PlanFragment" class stating that this is true only for final output fragment, but not for temporary table writer?
1184a83 to
37ecfb2
Compare
|
cc: @tdcmeehan |
|
Nit (commenting because it's not enough for a review): in Description, suggest deleting the lines in the release note entry after the line |
Thanks! |
The writtenIntermediateBytes metric was noop because plan.isOutputTableWriterFragment() will always be true and wrong metrics were updated when there are temporary table writes currently since there was a bug in plan Fragmenter where it would pass temporary tables' writer operator as output table writes hence populating the wrong metric.
code link.
Fixed by adding the information (whether temporary) to the tablewriterNode and filtering out those
Impact
Fixed writtenIntermediateBytes metric. Users of CTE and Exchange materialization should now be able to see the correct populated metric
Test Plan
Production tested
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.