Skip to content

Add periodic EOB completion check to Coordinator for bootstrap datastreams#1015

Closed
mittalprince wants to merge 2 commits into
masterfrom
pmittal/coordinator-eob-metadata
Closed

Add periodic EOB completion check to Coordinator for bootstrap datastreams#1015
mittalprince wants to merge 2 commits into
masterfrom
pmittal/coordinator-eob-metadata

Conversation

@mittalprince
Copy link
Copy Markdown
Collaborator

Summary

  • Added periodicEobCheck scheduled task in Coordinator that runs on the leader and checks whether all tasks for bootstrap datastreams have reached COMPLETE status
  • Added maybeMarkEOBCompleteForBootstrapDatastreams which stamps system.isEOBComplete=true on all datastreams in the group (including deduped streams) when all tasks are complete
  • Added IS_EOB_COMPLETE constant to DatastreamMetadataConstants
  • Added eobCheckPeriodMs and eobCheckConnectorNames config to CoordinatorConfig with defaults (1 min period, all connectors)
  • Added unit tests covering happy path, edge cases (no tasks, null status, update failure, multiple groups, connector allowlist, non-leader)

Testing Done

  • Unit tests added for all edge cases in TestCoordinator
  • Integration tests pass
  • Manual testing performed

pmittal added 2 commits May 20, 2026 14:56
Cover previously untested edge cases:
- No tasks assigned yet -> bootstrap not started, skip
- Task with null status -> not treated as COMPLETE
- updateDatastream returns false -> no exception, retries next cycle
- Multiple bootstrap groups -> only the complete one gets flagged
…reams

- Add IS_EOB_COMPLETE constant to DatastreamMetadataConstants
- Add periodicEobCheck scheduled task on the leader that stamps
system.isEOBComplete=true on bootstrap datastream groups once all
assigned tasks reach COMPLETE status
- Add eobCheckPeriodMs and eobCheckConnectorNames config to CoordinatorConfig
@mittalprince mittalprince changed the title Pmittal/coordinator eob metadata Add periodic EOB completion check to Coordinator for bootstrap datastreams May 20, 2026
* {@link com.linkedin.datastream.server.DatastreamTaskStatus.Code#COMPLETE} status, indicating
* that End-of-Bootstrap (EOB) events have been successfully produced to all destination partitions.
*/
public static final String IS_EOB_COMPLETE = "system.isEOBComplete";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

should it be renamed as system.isBootstrapComplete?

Datastream representative = group.getDatastreams().get(0);

// Bootstrap datastreams are identified by the "bst-" prefix in their name.
if (!representative.getName().contains("bst-")) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this check can return false positives.
It would be better to check this via datastream's connector name.

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.

2 participants