Skip to content

Conversation

@shanicky
Copy link
Contributor

@shanicky shanicky commented Oct 31, 2025

Remove the ActorStatus enum and all related actor state tracking from the meta model and controller layers to simplify the codebase and metadata handling.

  • Delete actor.rs model file and remove the status field from ActorModel
  • Remove ActorState enum and state field from proto ActorStatus message, reserving the field number for backward compatibility
  • Update frontend catalog to hardcode actor state as "RUNNING" instead of reading from proto
  • Remove all conversions and references to PbActorState and actor status in service and controller code
  • Eliminate code rebuilding fragment mappings based on actor states and related tests

This change reflects a design decision to treat all actors as implicitly running and to externalize or remove ephemeral state tracking from metadata, reducing complexity and maintenance overhead.

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

close #23604 #23605

What's changed and what's your intention?

Summary
This PR removes the ActorStatus enum and all associated actor state management logic from the meta and frontend codebases. Actor states are no longer tracked dynamically; instead, actors are assumed to be always "RUNNING", simplifying the system’s handling of actor lifecycle and status.

Details

  • Removed the ActorState enum and the state field from the ActorStatus protobuf message, reserving the field number for backward compatibility.
  • Deleted the Rust actor.rs model containing ActorStatus and the status field from ActorModel.
  • Updated all code references that previously relied on actor states to either omit status or use a hardcoded "RUNNING" string (notably in the frontend catalog query and stream service).
  • Removed helper functions and logic that filtered or handled actors based on their state (e.g., rebuild_fragment_mapping_from_actors).
  • Simplified the frontend system catalog rw_actors to report a constant actor state, reducing complexity and potential state inconsistencies.
  • These changes reflect a design decision to deprecate explicit actor state tracking within the meta layer, likely to reduce overhead and align with updated runtime semantics.

Checklist

  • I have written necessary rustdoc comments.

Remove the ActorStatus enum and all related actor state tracking from the meta model
and controller layers to simplify the codebase and metadata handling.

- Delete `actor.rs` model file and remove the `status` field from ActorModel
- Remove ActorState enum and `state` field from proto `ActorStatus` message, reserving
  the field number for backward compatibility
- Update frontend catalog to hardcode actor state as "RUNNING" instead of reading from proto
- Remove all conversions and references to PbActorState and actor status in service and
  controller code
- Eliminate code rebuilding fragment mappings based on actor states and related tests

This change reflects a design decision to treat all actors as implicitly running and
to externalize or remove ephemeral state tracking from metadata, reducing complexity and
maintenance overhead.

Signed-off-by: Peng Chen <[email protected]>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the concept of actor state (Inactive/Running) from the RisingWave metadata model. The changes simplify the codebase by eliminating unused state tracking infrastructure and treating all actors as running once they are created.

Key Changes

  • Removed ActorState enum and related status field from ActorModel
  • Deleted the entire src/meta/model/src/actor.rs file containing the ActorStatus enum
  • Removed unused methods from StreamJobFragments: update_actors_state, worker_actor_states, active_actors
  • Removed the rebuild_fragment_mapping_from_actors helper function
  • Reserved the state field in protobuf definitions for backward compatibility
  • Updated system catalog rw_actors to return hardcoded "RUNNING" state

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/meta/model/src/actor.rs Entire file deleted - contained ActorStatus enum and ActorModel with status field
src/meta/model/src/lib.rs Removed module declaration for actor.rs
src/meta/src/model/stream.rs Removed unused methods and updated comment to reflect removal of actor status tracking
src/meta/src/controller/fragment.rs Moved ActorModel definition here (without status field) and updated all usages
src/meta/src/controller/utils.rs Removed status field from PartialActorLocation and deleted rebuild_fragment_mapping_from_actors function
src/meta/src/rpc/ddl_controller.rs Removed status field initialization when creating actors
src/meta/service/src/stream_service.rs Removed state field from ActorState response
src/frontend/src/catalog/system_catalog/rw_catalog/rw_actors.rs Hardcoded state to "RUNNING" instead of reading from metadata
proto/meta.proto Reserved state field in ActorStatus and ActorState messages for backward compatibility

Copy link
Member

@yezizp2012 yezizp2012 left a comment

Choose a reason for hiding this comment

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

Lgtm

}

#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct ActorModel {
Copy link
Member

Choose a reason for hiding this comment

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

Can we remove the Model key word as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we just call it "Actor"? It feels a bit too general.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed it to ActorInfo and strictly limited the scope.

- Rename struct `ActorModel` to `ActorInfo` to clarify its role as actor metadata
- Remove `pub` from `ActorInfo` to limit its usage to the module scope
- Make `compose_table_fragments` and `compose_fragment` private to encapsulate internals
- Update all function signatures and variables to use `ActorInfo` instead of `ActorModel`
- Improve API encapsulation by reducing the public surface of fragment-related components

Signed-off-by: Peng Chen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

remove actor status

3 participants