viirya commented on code in PR #6429: URL: https://github.com/apache/datafusion-comet/pull/6429#discussion_r4202115421
########## native/core/src/parquet/objectstore/http_metrics.rs: ########## @@ -0,0 +1,327 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +//! Scan attribution at object_store's HTTP connector boundary. +//! +//! The connector delegates client construction, requests, responses, and errors unchanged. +//! Counts include object_store retries of HTTP errors and interrupted response bodies, but +//! exclude redirects and protocol retries performed internally by reqwest, credential requests, +//! and bucket-region discovery. They are not a count of every request transmitted on the wire. Review Comment: Comet's own location-scoped re-route also lands in `http_retries`. When `LocationScopedObjectStore::get_opts` (`location_scoped.rs:314`) gets a `PermissionDenied`, it resolves the route again and calls the new store with `options.clone()`. That clone carries the same `Arc<RequestState>`. The re-routed store is also built by `S3StoreTemplate::build`, so it has `ScanHttpConnector` too. A 403 followed by a successful re-route therefore shows up as one observed GET, two attempts and one retry. Counting it seems right to me, since it really is another HTTP attempt for the same logical GET. But this comment and the new section in `metrics.md` only list HTTP-status retries and interrupted-body resumes. On a table that uses credential vending, someone could read a nonzero `http_retries` as S3 throttling when it was really an expired location credential. Could both places mention the re-route? It could go in the paragraph Andy suggested for `metrics.md`. A loopback test where the first route returns 403 would also pin down the count. -- 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]
