Skip to content

feat(compression-coordinator): Complete S3 compression job handle implementation. - #2420

Merged
LinZhihao-723 merged 12 commits into
y-scope:mainfrom
Bill-hbrhbr:compression-coordinator-job-handle-impl
Jul 29, 2026
Merged

feat(compression-coordinator): Complete S3 compression job handle implementation.#2420
LinZhihao-723 merged 12 commits into
y-scope:mainfrom
Bill-hbrhbr:compression-coordinator-job-handle-impl

Conversation

@Bill-hbrhbr

@Bill-hbrhbr Bill-hbrhbr commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Description

Implement S3CompressionJobHandle to drive an S3 compression job from preparation through completion.

  • Load the requested S3 object metadata from the CLP database.
  • Validate that all requested metadata entries exist.
  • Partition the S3 objects into compression-task inputs.
  • Create the dataset’s archive and column-metadata tables when necessary.
  • Submit the task graph to Spider.
  • Persist the Spider job ID, task count, and running status.
  • Wait for the Spider job to reach a terminal state.
  • Mark failed and cancelled jobs as Failed and Killed, respectively.

Checklist

  • The PR satisfies the contribution guidelines.
  • This is a breaking change and that has been indicated in the PR title, OR this isn't a
    breaking change.
  • Necessary docs have been updated, OR no docs need to be updated.

Validation performed

  • Ensure all workflows pass.
  • E2e tested on a dev branch.

Summary by CodeRabbit

  • New Features

    • Compression jobs now prepare and validate S3 object metadata before processing.
    • Job progress records include task counts, start times, and completion statuses.
    • Required metadata tables are created automatically when needed.
    • Compression tasks now support configurable partitioning and archive sizing.
  • Bug Fixes

    • Added clearer handling for missing, duplicate, or incomplete metadata.
    • Improved reporting for failed, cancelled, oversized, or empty compression jobs.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

This change implements S3 compression task preparation, metadata-table creation, Spider job persistence and completion handling, expanded coordinator errors, and database table-name resolution.

Changes

S3 compression orchestration

Layer / File(s) Summary
Database metadata contracts
components/clp-rust-utils/src/clp_config/package/config.rs, components/compression-coordinator/Cargo.toml
Adds column-metadata table-name resolution and runtime dependencies for the metadata workflow.
Coordinator contracts and construction
components/compression-coordinator/src/error.rs, components/compression-coordinator/src/job_handle.rs, components/compression-coordinator/src/partition.rs
Expands coordinator errors, updates internal job-handle construction, and adds a compression-input builder constructor.
Task input and metadata setup
components/compression-coordinator/src/job_handle.rs
Validates and batches S3 metadata, builds compression inputs and policies, creates metadata tables, and maps metadata rows.
Job persistence and completion
components/compression-coordinator/src/job_handle.rs
Persists Spider identifiers and task counts, polls terminal outcomes, reads CLP status, and updates job status and messages.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant S3CompressionJobHandle
  participant MySQL
  participant Spider
  S3CompressionJobHandle->>MySQL: fetch metadata and create tables
  MySQL-->>S3CompressionJobHandle: return metadata rows
  S3CompressionJobHandle->>Spider: submit compression tasks
  S3CompressionJobHandle->>MySQL: persist Spider ID and task count
  Spider-->>S3CompressionJobHandle: return completion outcome
  S3CompressionJobHandle->>MySQL: update CLP job status
Loading

Possibly related issues

Possibly related PRs

  • y-scope/clp#2401 — Provides related compression-coordinator scaffolding and shared error surfaces.
  • y-scope/clp#2417 — Uses the completed S3CompressionJobHandle and its coordinator error variants.
  • y-scope/clp#2421 — Adds the schema and configuration support for the Spider handoff persisted by this change.

Suggested reviewers: linzhihao-723, davidlion

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: implementing the S3 compression job handle in compression-coordinator.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@LinZhihao-723 LinZhihao-723 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take a brief look. The general implementation looks good to me, despite there are some style-wise issues we may need to polish a bit.
I also put up two TODO as unfinished work for this PR.
Will be off for the rest of this week, will continue to work on this PR next Monday.
@20001020ycx For your E2E testing, I think this PR should be sufficient. Just make sure:

  • Don't make concurrent compression job submission yet.
  • Don't make a super large compression job otherwise it may timeout, lol.

These are known issues and we will fix them next week before the release.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've splitted this to #2421.

Comment on lines +135 to +142
/// Mirror of `clp_py_utils.clp_config.CLP_METADATA_TABLE_PREFIX`.
const CLP_METADATA_TABLE_PREFIX: &str = "clp_";

Self {
host: "localhost".to_owned(),
port: 3306,
names: ClpDbNames::default(),
table_prefix: CLP_METADATA_TABLE_PREFIX.to_owned(),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is in #2406.

Comment thread components/clp-rust-utils/src/clp_config/package/config.rs

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is in #2406.

Comment on lines +25 to +26
const COMPRESSION_JOB_TABLE_NAME: &str = "compression_jobs";
const INGESTED_S3_OBJECT_METADATA_TABLE_NAME: &str = "ingested_s3_object_metadata";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are private symbols. They should be relocated after public symbols. For details, check https://github.com/LinZhihao-723/claude-instruction/blob/main/rust/coding-style.md#symbol-ordering

Comment on lines +263 to +268
/// * [`Error::NoS3ObjectMetadata`] if the job doesn't request any object metadata IDs.
/// * [`Error::Sqlx`] if the metadata query fails.
/// * [`Error::MissingS3ObjectMetadata`] if the query doesn't return every requested ID.
/// * [`Error::EmptyS3ObjectMetadataField`] if a returned bucket or key is empty.
/// * Forwards [`CompressionInputBuilder::add`]'s return values on failure.
/// * [`Error::NoTaskInputs`] if no compression task inputs are produced.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Forwarded errors should be listed after directly returned errors.
  • For errors that are mapped, we should use Forwards [METHOD]'s return values as [MAPPED_ERROR] on failure.

Comment on lines +469 to +484
CompressionJobOutcome::Failed { error_message } => {
self.update_job_status(
CompressionJobStatus::Failed,
Some(format!(
"The Spider compression job failed: {error_message}"
)),
)
.await
}
CompressionJobOutcome::Cancelled => {
self.update_job_status(
CompressionJobStatus::Killed,
Some("The Spider compression job was cancelled.".to_owned()),
)
.await
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: There is a corner case where the Spider job failed or was canceled, but the commit task was already executed. As a side effect, the compression job might already be marked as Succeeded. Check #2415 for more details.
For now, I think we need to check whether the compression job status is already Succeeded when the spider job is canceled or failed. If so, we should leave it as Succeeded.
In the long term, a better approach is to add a transition state between Running and Succeeded: instead of Running -> Succeeded, it should be Running -> Committed -> Succeeded. And the archive metadata ingested should be marked with the spider job ID (we already have the creator ID in the table schema but not used by the current package). In that way, we can roll back the database side effect when the spider job is reported as failed, but the compression job is already in the Committed state.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coderabbitai Please create an issue to conclude this scenario, and document the potential design for adding a Committed state.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="y-scope/clp"
title="Handle Spider terminal failures after compression-job commit"
body="$(cat <<'EOF'
## Summary

A Spider compression job can be reported as `Failed` or `Cancelled` after its commit task has already completed. The commit task may already have published archive metadata and marked the corresponding CLP compression job as `Succeeded`. In that case, overwriting the job status based solely on the final Spider outcome produces an inconsistent result.

## Immediate safeguard

When processing a Spider `Failed` or `Cancelled` outcome in `S3CompressionJobHandle::to_completion`, first determine whether the CLP compression job is already `Succeeded`. If it is, preserve `Succeeded` rather than changing it to `Failed` or `Killed`.

## Proposed durable design

Introduce a `Committed` compression-job state between `Running` and `Succeeded`:

```text
Running -> Committed -> Succeeded

Suggested responsibilities:

  • The commit task transitions the compression job from Running to Committed while publishing archive metadata, within the same database transaction.
  • Archive metadata created by a Spider job is associated with that Spider job ID. The archive table already has a creator_id column that can support this association but is not currently used by the package.
  • A later Spider terminal failure/cancellation can use the Committed state and Spider-job association to identify and roll back the database side effects before marking the compression job terminally failed/killed.
  • The final transition to Succeeded happens only after the system has confirmed the job should be considered successful.

Affected areas

  • components/compression-coordinator/src/job_handle.rs (S3CompressionJobHandle::to_completion)
  • Compression-job status/state definitions and database schema/migrations
  • Spider commit-task transaction that publishes archive metadata
  • Archive metadata persistence, including use of creator_id

Acceptance criteria

  • Failed/cancelled Spider outcomes do not overwrite an already-Succeeded compression job.
  • A Committed state and valid state-transition rules are defined and persisted.
  • The commit task atomically records the committed state and archive metadata publication.
  • Archive metadata can be traced to the originating Spider job ID.
  • A failure/cancellation after commit can roll back the associated database side effects and leave a consistent terminal compression-job state.
  • Tests cover normal success, failure before commit, cancellation before commit, and failure/cancellation reported after commit.

Backlinks

Requested by @LinZhihao-723.
EOF
)"

gh issue create
--repo "$repo"
--title "$title"
--body "$body"
--assignee "LinZhihao-723"


Length of output: 3145

---

</details>

`@LinZhihao-723`, created `#2428` to track the immediate safeguard and the longer-term `Running → Committed → Succeeded` design, including rollback and archive-to-Spider-job association requirements.

Comment thread components/compression-coordinator/src/job_handle.rs

@LinZhihao-723 LinZhihao-723 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed and polished prepare_task_inputs, please check.

Comment on lines +34 to +35
ingestion_job_id: IngestionJobId,
id: S3ObjectMetadataId,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use IngestionJobId and S3ObjectMetadataId. We should avoid to use general ID types like u64.

ids: Vec<S3ObjectMetadataId>,
},

#[error("S3 object metadata {id} has an empty `{field}`")]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Label field as a simple.

/// Returns an error if:
///
/// * [`Error::NoS3ObjectMetadata`] if the job doesn't request any object metadata IDs.
/// * [`Error::Sqlx`] if the metadata query fails.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sqlx is not directly returned; it's forwarded from sqlx::query::QueryAs::fetch_all.


let InputConfig::S3ObjectMetadataInputConfig { config } = &self.input_config else {
return Err(Error::UnsupportedInputConfig);
unreachable!("the input config is validated in the factory")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use unreachable instead since this is already checked in the factory.

Comment on lines +280 to 297
let mut sorted_metadata_ids = config.s3_object_metadata_ids.clone();
sorted_metadata_ids.sort_unstable();
let mut duplicate_ids: Vec<S3ObjectMetadataId> = Vec::new();
sorted_metadata_ids.dedup_by(|a, b| {
if *a != *b {
return false;
}
if duplicate_ids.last().copied() != Some(*b) {
duplicate_ids.push(*b);
}
true
});
if !duplicate_ids.is_empty() {
return Err(Error::DuplicateS3ObjectMetadata {
ingestion_job_id: config.ingestion_job_id,
metadata_ids: missing_ids,
ids: duplicate_ids,
});
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We short-circuit duplicate entries.

Comment on lines +322 to +350
let mut row_iter = metadata_rows.into_iter().peekable();
for &expected_id in chunk {
if row_iter.peek().is_none_or(|row| row.id != expected_id) {
return Err(Error::MissingS3ObjectMetadata {
ingestion_job_id: config.ingestion_job_id,
id: expected_id,
});
}
})?;
let key =
NonEmptyString::new(key).map_err(|_| Error::EmptyS3ObjectMetadataField {
metadata_id,
field: "key",
let row = row_iter
.next()
.expect("row should have been validated by the previous peek");
let bucket = NonEmptyString::new(row.bucket).map_err(|_| {
Error::EmptyS3ObjectMetadataField {
id: row.id,
field: "bucket",
}
})?;
let key = NonEmptyString::new(row.key).map_err(|_| {
Error::EmptyS3ObjectMetadataField {
id: row.id,
field: "key",
}
})?;
input_builder.add(ObjectMetadata {
bucket,
key,
size: row.size,
})?;
input_builder.add(ObjectMetadata { bucket, key, size })?;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the missing ID report logic to early terminate on the first missing ID.

Comment on lines +361 to +369
// NOTE: The timeout policy scales with the number of objects assigned to the task.
// Each object contributes three minutes to the soft timeout and five minutes to
// the hard timeout. This heuristic does not account for object size and can be
// refined in the future.
let num_objects = input_source.object_keys.len() as u64;
let timeout_policy = TimeoutPolicy {
soft_timeout_ms: num_objects * 3 * 60 * 1000,
hard_timeout_ms: num_objects * 5 * 60 * 1000,
};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a simply heuristic to resolve 1a2a2ec#r3641677514.

Comment on lines +548 to +555
/// A projection of the columns read from an ingested S3 object metadata row.
#[derive(Debug, sqlx::FromRow)]
struct S3ObjectMetadataRow {
id: S3ObjectMetadataId,
bucket: String,
key: String,
size: u64,
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a struct for the row project.

/// A newly created [`CompressionInputBuilder`] with an empty buffer.
#[must_use]
pub(crate) fn from_s3_config(s3_config: S3Config, target_archive_size: u64) -> Self {
pub(crate) const fn from_s3_config(s3_config: S3Config, target_archive_size: u64) -> Self {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linter fix.


/// Resumes a compression job that was already submitted to Spider.
///
///

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed in the previous PR.

@LinZhihao-723 LinZhihao-723 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reviewed the rest of implementation. Please check.

s3::{ObjectMetadata, S3ObjectMetadataId},
task_io::compression::{ClpSCompressionOption, S3InputSource},
};
use const_format::formatcp;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use const format for compile-time decided SQL statements.

Serialize,
ToSchema,
TryFromPrimitive,
sqlx::Type,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add this to avoid explicit conversion for i32.

let num_tasks =
i32::try_from(num_tasks).map_err(|_| Error::TooManyCompressionTasks(num_tasks))?;
sqlx::query(&format!(
sqlx::query(formatcp!(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

))
.bind(spider_job_id.get())
.bind(i32::from(CompressionJobStatus::Running))
.bind(CompressionJobStatus::Running)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +457 to +458
= ?, `start_time` = CURRENT_TIMESTAMP(3), `update_time` = CURRENT_TIMESTAMP() WHERE \
`id` = ?"
= ?, `start_time` = CURRENT_TIMESTAMP(3) WHERE `id` = ?"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove update_time as I will add an auto updates as a part of #2421.

Comment on lines +504 to +509
if CompressionJobStatus::Succeeded == self.get_job_status().await? {
// NOTE: The commit task may successfully proceed but fail to report to Spider's
// control unit. In that case, the compression outcome has already committed to
// CLP DB, and thus the job should be considered `Succeeded`.
return Ok(());
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LinZhihao-723
LinZhihao-723 marked this pull request as ready for review July 28, 2026 22:50
@LinZhihao-723
LinZhihao-723 requested a review from a team as a code owner July 28, 2026 22:50
@LinZhihao-723 LinZhihao-723 changed the title feat(compression-coordinator): Finish S3 compression job handling implementation. feat(compression-coordinator): Finish S3 compression job handle implementation. Jul 28, 2026
@LinZhihao-723 LinZhihao-723 changed the title feat(compression-coordinator): Finish S3 compression job handle implementation. feat(compression-coordinator): Complete S3 compression job handle implementation. Jul 28, 2026

@LinZhihao-723 LinZhihao-723 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Directly modified the PR title.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@components/compression-coordinator/src/job_handle.rs`:
- Around line 444-465: Update persist_spider_job_id so its status/start_time
transition only updates rows that are still non-terminal, preventing it from
overwriting Succeeded or other terminal states after submit_s3_compression_job
returns. Preserve the existing task-count validation and consider separating or
moving spider_id/num_tasks persistence if those fields must still be written
when the guarded transition is skipped.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b6bf23d6-6650-4a5f-870c-f753e06172f5

📥 Commits

Reviewing files that changed from the base of the PR and between 2e63d71 and 8ca1e9a.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • components/clp-rust-utils/src/clp_config/package/config.rs
  • components/compression-coordinator/Cargo.toml
  • components/compression-coordinator/src/error.rs
  • components/compression-coordinator/src/job_handle.rs
  • components/compression-coordinator/src/partition.rs

Comment on lines +444 to 465
/// * [`Error::TooManyCompressionTasks`] if `num_tasks` exceeds `i32`'s range.
/// * Forwards [`sqlx::query::Query::execute`]'s return values on failure.
async fn persist_spider_job_id(
&self,
spider_job_id: SpiderJobId,
num_tasks: usize,
) -> Result<(), Error> {
let num_tasks =
i32::try_from(num_tasks).map_err(|_| Error::TooManyCompressionTasks(num_tasks))?;
sqlx::query(formatcp!(
"UPDATE `{COMPRESSION_JOB_TABLE_NAME}` SET `spider_id` = ?, `status` = ?, `num_tasks` \
= ?, `start_time` = CURRENT_TIMESTAMP(3) WHERE `id` = ?"
))
.bind(spider_job_id.get())
.bind(CompressionJobStatus::Running)
.bind(num_tasks)
.bind(self.compression_job_id)
.execute(&self.db_pool)
.await?;

Ok(())
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Unconditional status = Running can clobber a terminal status set by the commit task.

persist_spider_job_id runs after submit_s3_compression_job returns. A short job's commit task can transition the row to Succeeded before this UPDATE executes, at which point the row is forced back to Running (and start_time reset). to_completion then observes CompressionJobOutcome::Succeeded and returns Ok(()) without writing any status, so the job is left permanently Running in the CLP database.

Guard the transition so it only applies while the job is still pre-terminal.

🛠️ Restrict the status transition to non-terminal rows
         sqlx::query(formatcp!(
             "UPDATE `{COMPRESSION_JOB_TABLE_NAME}` SET `spider_id` = ?, `status` = ?, `num_tasks` \
-             = ?, `start_time` = CURRENT_TIMESTAMP(3) WHERE `id` = ?"
+             = ?, `start_time` = CURRENT_TIMESTAMP(3) WHERE `id` = ? AND `status` = ?"
         ))
         .bind(spider_job_id.get())
         .bind(CompressionJobStatus::Running)
         .bind(num_tasks)
         .bind(self.compression_job_id)
+        .bind(CompressionJobStatus::Pending)
         .execute(&self.db_pool)
         .await?;

Note that with this guard the spider_id/num_tasks write is also skipped when the row already advanced, so consider persisting those columns separately (or before submission) if recovery depends on spider_id being present.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/compression-coordinator/src/job_handle.rs` around lines 444 - 465,
Update persist_spider_job_id so its status/start_time transition only updates
rows that are still non-terminal, preventing it from overwriting Succeeded or
other terminal states after submit_s3_compression_job returns. Preserve the
existing task-count validation and consider separating or moving
spider_id/num_tasks persistence if those fields must still be written when the
guarded transition is skipped.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@components/compression-coordinator/src/job_handle.rs`:
- Around line 356-375: Update the timeout calculation in the input-source
mapping to enforce a minimum soft and hard timeout for small-object-count tasks,
so a single large object is not limited to only the raw per-object duration.
Apply the floor while preserving the existing object-count scaling and the
relationship between soft and hard timeouts, using the existing TimeoutPolicy
construction.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4e7dee56-510f-4b87-aede-d646ecc2f3d8

📥 Commits

Reviewing files that changed from the base of the PR and between 2e63d71 and 8ca1e9a.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • components/clp-rust-utils/src/clp_config/package/config.rs
  • components/compression-coordinator/Cargo.toml
  • components/compression-coordinator/src/error.rs
  • components/compression-coordinator/src/job_handle.rs
  • components/compression-coordinator/src/partition.rs

Comment thread components/compression-coordinator/src/job_handle.rs
@LinZhihao-723
LinZhihao-723 merged commit 8c0a1e4 into y-scope:main Jul 29, 2026
31 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants