diff --git a/python/perfetto/bigtrace/api.py b/python/perfetto/bigtrace/api.py index c57026d29a..3dc1fa5f3f 100644 --- a/python/perfetto/bigtrace/api.py +++ b/python/perfetto/bigtrace/api.py @@ -58,7 +58,7 @@ def query(self, traces: List[str], sql_query: str): repeated_batches.extend(result.batch) iterator = QueryResultIterator(column_names, repeated_batches) df = iterator.as_pandas_dataframe() - # TODO(ivankc) Investigate whether this is the + # TODO(b/366409021) Investigate whether this is the # best place to insert these addresses for performance df.insert(0, '_trace_address', response.trace) tables.append(df) diff --git a/src/bigtrace/orchestrator/orchestrator_impl.cc b/src/bigtrace/orchestrator/orchestrator_impl.cc index 8a151ef2b4..f9542dbca9 100644 --- a/src/bigtrace/orchestrator/orchestrator_impl.cc +++ b/src/bigtrace/orchestrator/orchestrator_impl.cc @@ -67,6 +67,15 @@ grpc::Status ExecuteQueryOnTrace( response.set_trace(trace_response.trace()); for (const protos::QueryResult& query_result : trace_response.result()) { response.add_result()->CopyFrom(query_result); + if (query_result.has_error()) { + // TODO(b/366410502) Add a mode of operation where some traces are allowed + // to be dropped and a corresponding message is displayed to the user + // alongside partial results + std::lock_guard status_guard(worker_lock); + query_status = grpc::Status(grpc::StatusCode::INTERNAL, + "[" + trace + "]: " + query_result.error()); + break; + } } std::lock_guard buffer_guard(worker_lock); response_buffer.emplace_back(std::move(response));