-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add trace support for TableWriter #10910
Conversation
✅ Deploy Preview for meta-velox canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@duanmeng LGTM % minors!
2363373
to
3818fd9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@duanmeng LGTM. Thanks!
3818fd9
to
08a2264
Compare
6cbfc3e
to
3ab77ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@duanmeng LGTM % nits. thanks!
velox/exec/Task.cpp
Outdated
const auto queryTraceNodes = queryConfig.queryTraceNodeIds(); | ||
if (queryTraceNodes.empty()) { | ||
return trace::QueryTraceConfig(queryConfig.queryTraceDir()); | ||
LOG(WARNING) << "Query trace is enabled, but no nodes will be traced."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Query metadata trace enabled
velox/exec/Task.cpp
Outdated
return trace::QueryTraceConfig(traceDir); | ||
} | ||
if (queryConfig.queryTraceMaxBytes() == 0) { | ||
LOG(WARNING) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just check in tracing path?
4bedead
to
c82b5cd
Compare
velox/exec/Task.cpp
Outdated
@@ -2855,10 +2855,13 @@ std::optional<trace::QueryTraceConfig> Task::maybeMakeTraceConfig() const { | |||
if (!RE2::FullMatch(taskId_, queryConfig.queryTraceTaskRegExp())) { | |||
return std::nullopt; | |||
} | |||
LOG(INFO) << "Query metadata trace enabled in task: " << taskId_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just remove metadata trace only use case? Thanks!
Trace query metadata for task: <<
c82b5cd
to
2b0ed98
Compare
velox/exec/Operator.cpp
Outdated
return; | ||
} | ||
|
||
if (operatorCtx_->driverCtx()->queryConfig().queryTraceMaxBytes() == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check queryTraceMaxBytes first?
a83758d
to
fd1f5e6
Compare
velox/exec/Operator.cpp
Outdated
|
||
const auto pipelineId = operatorCtx_->driverCtx()->pipelineId; | ||
const auto driverId = operatorCtx_->driverCtx()->driverId; | ||
LOG(INFO) << "Query data trace enabled in operator: " << operatorType() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trace data for operator type: operatorType(), op id: , pipeline, driver:
fd1f5e6
to
c7448ff
Compare
c7448ff
to
36074cc
Compare
@xiaoxmeng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@xiaoxmeng merged this pull request in 3fe248f. |
Conbench analyzed the 1 benchmark run on commit There were no benchmark performance regressions. 🎉 The full Conbench report has more details. |
Summary: Create a `QueryDataWriter` in `exec::TableWriter` if the query trace is enabled, recording the input vectors batch by batch. Each operator writes its data to the directory `$rootDir/$pipelineId/$driverId/data`. The recorded data will be used to replay the execution of `exec::TableWriter`, which will be supported in the follow-up. Design notes: https://docs.google.com/document/d/1crIIeVz4tWKYQnBoHoxrv2i-4zAML9HSYLps8h5SDrc/edit#heading=h.y6j2ojtr7hm9 Part of facebookincubator#9668 Pull Request resolved: facebookincubator#10910 Reviewed By: pedroerp Differential Revision: D63444416 Pulled By: xiaoxmeng fbshipit-source-id: ddd74ff6dd56de7bce31ec536035b32211453364
Create a
QueryDataWriter
inexec::TableWriter
if the query trace is enabled,recording the input vectors batch by batch. Each operator writes its data to the
directory
$rootDir/$pipelineId/$driverId/data
. The recorded data will be usedto replay the execution of
exec::TableWriter
, which will be supported in thefollow-up.
Design notes: https://docs.google.com/document/d/1crIIeVz4tWKYQnBoHoxrv2i-4zAML9HSYLps8h5SDrc/edit#heading=h.y6j2ojtr7hm9
Part of #9668