Skip to content

Commit f0b8346

Browse files
[HOTFIX] applying PR #5771 to release/2025-10-24 (#5776)
This PR cherry-picks the commit 5ca19f7 onto release/2025-10-24. If there are unresolved conflicts, please resolve them manually. Co-authored-by: Macronova <[email protected]>
1 parent ed8c584 commit f0b8346

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

rust/log-service/src/lib.rs

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,13 +1449,24 @@ impl LogServer {
14491449
Arc::clone(&storage),
14501450
target_prefix,
14511451
);
1452+
let new_manifest = log_reader
1453+
.manifest()
1454+
.await
1455+
.map_err(|err| {
1456+
Status::new(
1457+
err.code().into(),
1458+
format!("Unable to read copied manifest: {}", err),
1459+
)
1460+
})?
1461+
.ok_or_else(|| Status::internal("Unable to find copied manifest"))?;
1462+
let first_copied_offset = new_manifest.oldest_timestamp();
1463+
if offset < first_copied_offset {
1464+
return Err(Status::internal(format!(
1465+
"Compaction cursor [{offset:?}] is behind start of manifest [{first_copied_offset:?}]",
1466+
)));
1467+
}
14521468
// This is the next record to insert, so we'll have to adjust downwards.
1453-
let max_offset = log_reader.next_write_timestamp().await.map_err(|err| {
1454-
Status::new(
1455-
err.code().into(),
1456-
format!("Failed to read copied log: {}", err),
1457-
)
1458-
})?;
1469+
let max_offset = new_manifest.next_write_timestamp();
14591470
if max_offset < offset {
14601471
return Err(Status::new(
14611472
chroma_error::ErrorCodes::Internal.into(),

0 commit comments

Comments
 (0)