jiacai2050 commented on code in PR #1426:
URL:
https://github.com/apache/incubator-horaedb/pull/1426#discussion_r1444225080
##########
components/object_store/src/metrics.rs:
##########
@@ -225,11 +225,22 @@ impl ObjectStore for StoreWithMetrics {
async fn get_ranges(&self, location: &Path, ranges: &[Range<usize>]) ->
Result<Vec<Bytes>> {
let _timer = OBJECT_STORE_DURATION_HISTOGRAM.get_ranges.start_timer();
- let result = self.store.get_ranges(location, ranges).await?;
+ let store = self.store.clone();
+ let loc = location.clone();
+ let ranges = ranges.to_vec();
+ let result = self
+ .runtime
+ .spawn(async move { store.get_ranges(&loc, &ranges).await })
Review Comment:
How about apply this logic to all methods of ObjectStore, instead of add one
by one.
It's really a footgun when some methods are run in isolated runtime, while
others are not.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]