Skip to content

Refactor BatchOperation Scheduler for better modularity #36751

@mustafadagher

Description

@mustafadagher

Currently BatchOperationExecutionScheduler (and BatchOperationInitializer) are doing too much. BatchOperationExecutionScheduler handles scheduling, retry logic, state management, and validation. BatchOperationInitializer handles pagination, chunking, command creation, and error handling.

Also:

  • The mutable InitLoopState class and AtomicReference<ExecutionLoopState> make the code hard to follow and reason about.
  • Methods like executeRetrying() and initializeBatchOperation() are doing multiple things and have complex control flow.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions