benroeder commented on code in PR #7212:
URL: https://github.com/apache/opendal/pull/7212#discussion_r2838746983
##########
core/services/swift/src/core.rs:
##########
@@ -233,6 +234,145 @@ impl SwiftCore {
self.info.http_client().send(req).await
}
+
+ /// Build the segment path for an SLO part.
+ ///
+ /// Segments are stored as:
`.segments/{object_path}/{upload_id}/{part_number:08}`
+ pub fn slo_segment_path(&self, path: &str, upload_id: &str, part_number:
usize) -> String {
+ let abs = build_abs_path(&self.root, path);
+ format!(
+ ".segments/{}{}/{:08}",
Review Comment:
The `.segments/` prefix is a convention, not defined by Swift — SLO just
needs segments to be reachable objects anywhere in the container. This
convention is widely used by Swift clients (e.g. python-swiftclient uses the
same pattern).
Segments won't appear in OpenDAL listings because they're outside the user's
root prefix — `swift_list` uses `build_abs_path(&self.root, path)` as the
prefix filter, and `.segments/` sits at the container root. They would be
visible if someone lists the container directly via the Swift API, but that's
the same behavior as python-swiftclient.
--
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]