mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-14 00:53:14 +00:00
fix(app): keep object futures off caller stacks
This commit is contained in:
@@ -6544,12 +6544,15 @@ impl DefaultObjectUsecase {
|
||||
})
|
||||
}
|
||||
|
||||
#[instrument(level = "trace", skip(self, req))]
|
||||
#[hotpath::measure(impl_type = "DefaultObjectUsecase")]
|
||||
pub async fn execute_get_object(&self, req: S3Request<GetObjectInput>) -> S3Result<S3Response<GetObjectOutput>> {
|
||||
Box::pin(self.execute_get_object_inner(req)).await
|
||||
pub fn execute_get_object(
|
||||
&self,
|
||||
req: S3Request<GetObjectInput>,
|
||||
) -> impl std::future::Future<Output = S3Result<S3Response<GetObjectOutput>>> + Send + '_ {
|
||||
Box::pin(self.execute_get_object_inner(req))
|
||||
}
|
||||
|
||||
#[instrument(name = "DefaultObjectUsecase::execute_get_object", level = "trace", skip(self, req))]
|
||||
#[hotpath::measure(label = "DefaultObjectUsecase::execute_get_object", impl_type = "DefaultObjectUsecase")]
|
||||
async fn execute_get_object_inner(&self, req: S3Request<GetObjectInput>) -> S3Result<S3Response<GetObjectOutput>> {
|
||||
if let Some(context) = &self.context {
|
||||
let _ = context.object_store();
|
||||
@@ -7004,11 +7007,14 @@ impl DefaultObjectUsecase {
|
||||
result
|
||||
}
|
||||
|
||||
#[instrument(level = "debug", skip(self, req))]
|
||||
pub async fn execute_copy_object(&self, req: S3Request<CopyObjectInput>) -> S3Result<S3Response<CopyObjectOutput>> {
|
||||
Box::pin(self.execute_copy_object_inner(req)).await
|
||||
pub fn execute_copy_object(
|
||||
&self,
|
||||
req: S3Request<CopyObjectInput>,
|
||||
) -> impl std::future::Future<Output = S3Result<S3Response<CopyObjectOutput>>> + Send + '_ {
|
||||
Box::pin(self.execute_copy_object_inner(req))
|
||||
}
|
||||
|
||||
#[instrument(name = "DefaultObjectUsecase::execute_copy_object", level = "debug", skip(self, req))]
|
||||
async fn execute_copy_object_inner(&self, req: S3Request<CopyObjectInput>) -> S3Result<S3Response<CopyObjectOutput>> {
|
||||
if let Some(context) = &self.context {
|
||||
let _ = context.object_store();
|
||||
|
||||
Reference in New Issue
Block a user