westonpace commented on code in PR #12228:
URL: https://github.com/apache/arrow/pull/12228#discussion_r855748874


##########
cpp/src/arrow/compute/exec/sink_node.cc:
##########
@@ -103,6 +157,28 @@ class SinkNode : public ExecNode {
 
   Future<> finished() override { return finished_; }
 
+  void RecordBackpressureBytesUsed(const ExecBatch& batch) {
+    if (backpressure_queue_->enabled()) {
+      uint64_t bytes_used = static_cast<uint64_t>(batch.TotalBufferSize());
+      auto state_change = backpressure_queue_->RecordProduced(bytes_used);
+      if (state_change >= 0) {
+        EVENT(span_, "Backpressure applied", {{"counter", state_change}});

Review Comment:
   I changed it to `backpressure.counter`.  Is this what you were thinking?  It 
doesn't seem we are doing much namespacing elsewhere.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to