Skip to content

Commit fc52b05

Browse files
committed
avoid rwlock
1 parent b7854e4 commit fc52b05

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/compute/src/rpc/service/exchange_service.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ impl ExchangeServiceImpl {
165165
);
166166
pin_mut!(select_stream);
167167

168+
let exchange_frag_send_size_metrics = metrics
169+
.stream_fragment_exchange_bytes
170+
.with_label_values(&[&up_fragment_id, &down_fragment_id]);
171+
168172
while let Some(r) = select_stream.try_next().await? {
169173
match r {
170174
Either::Left(permits_to_add) => {
@@ -188,10 +192,7 @@ impl ExchangeServiceImpl {
188192

189193
yield response;
190194

191-
metrics
192-
.stream_fragment_exchange_bytes
193-
.with_label_values(&[&up_fragment_id, &down_fragment_id])
194-
.inc_by(bytes as u64);
195+
exchange_frag_send_size_metrics.inc_by(bytes as u64);
195196
}
196197
}
197198
}

0 commit comments

Comments
 (0)