This is an automated email from the ASF dual-hosted git repository.
Xuanwo pushed a commit to branch xuanwo/managed-space-reachability
in repository https://gitbox.apache.org/repos/asf/opendal-yinyang.git
The following commit(s) were added to
refs/heads/xuanwo/managed-space-reachability by this push:
new 0f0793f fix: preserve reachability traversal lifetimes
0f0793f is described below
commit 0f0793f95b9da4516ec1fd32de14aa95aab0b873
Author: Xuanwo <[email protected]>
AuthorDate: Sat Oct 31 03:32:08 2026 +0800
fix: preserve reachability traversal lifetimes
Bind physical inspection futures to the observed snapshot, pass owned page
cursors, and borrow content children for the authenticated traversal.
Co-authored-by: Psiace <[email protected]>
---
crates/core/src/authority.rs | 4 ++--
crates/core/src/data.rs | 2 +-
crates/core/src/object.rs | 2 +-
crates/core/src/reachability.rs | 1 -
4 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/crates/core/src/authority.rs b/crates/core/src/authority.rs
index 72affa4..b66b7e4 100644
--- a/crates/core/src/authority.rs
+++ b/crates/core/src/authority.rs
@@ -112,7 +112,7 @@ pub trait Authority: std::fmt::Debug + Send + Sync {
}
/// Traverse authenticated physical references reachable from this
/// authority's observed metadata roots without reading leaf payloads.
- fn inspect_physical(&self, snapshot: &Snapshot) -> BoxFuture<'_,
PhysicalInspection> {
+ fn inspect_physical<'a>(&'a self, snapshot: &'a Snapshot) -> BoxFuture<'a,
PhysicalInspection> {
Box::pin(crate::reachability::inspect_authority(self, snapshot))
}
fn commit_batch<'a>(
@@ -219,7 +219,7 @@ impl Authority for ObjectFs {
) -> BoxFuture<'_, Result<RevisionPage>> {
Box::pin(self.retained_revisions_page(after, limit))
}
- fn inspect_physical(&self, snapshot: &Snapshot) -> BoxFuture<'_,
PhysicalInspection> {
+ fn inspect_physical<'a>(&'a self, snapshot: &'a Snapshot) -> BoxFuture<'a,
PhysicalInspection> {
Box::pin(async move {
match self.observe_state().await {
Ok(state) => {
diff --git a/crates/core/src/data.rs b/crates/core/src/data.rs
index 6b61f98..fbb2c6b 100644
--- a/crates/core/src/data.rs
+++ b/crates/core/src/data.rs
@@ -449,7 +449,7 @@ impl DataStore {
async fn read_subtree(
&self,
- child: &Child,
+ child: &'a Child,
start: u64,
count: u64,
length: u64,
diff --git a/crates/core/src/object.rs b/crates/core/src/object.rs
index 2d75532..a09559d 100644
--- a/crates/core/src/object.rs
+++ b/crates/core/src/object.rs
@@ -368,7 +368,7 @@ impl ObjectFs {
));
}
let latest = self.observe_state().await?;
- let after_key = after.map(|revision| revision.to_bytes());
+ let after_key = after.map(|revision| revision.to_bytes().to_vec());
let rows = latest
.history
.scan(
diff --git a/crates/core/src/reachability.rs b/crates/core/src/reachability.rs
index baa0ffe..1ecf620 100644
--- a/crates/core/src/reachability.rs
+++ b/crates/core/src/reachability.rs
@@ -25,7 +25,6 @@ use crate::object::ObjectState;
use crate::snapshot::{ChangeRecord, Receipt, Revision, Snapshot};
use crate::{Error, ErrorKind, NodeId, Result};
use std::collections::{BTreeMap, BTreeSet, HashSet, VecDeque};
-use std::sync::Arc;
const SCAN_PAGE: usize = 4096;
const MAX_ISSUES: usize = 256;