vitessio/vitess · error

no filtered replication running on tablet: %v health record:

Error message

no filtered replication running on tablet: %v health record: %v

What it means

WaitForFilteredReplication requires that filtered replication (binlog player / vreplication) is actively running on the tablet, detected by BinlogPlayersCount > 0 in RealtimeStats. If the health record shows zero binlog players, no filtered replication is running, so there is nothing to wait for and the call fails. This means the migration's copy engine is not active on that tablet.

Source

Thrown at go/vt/wrangler/split.go:119

		return fmt.Errorf("failed to run explicit healthcheck on tablet: %v err: %v", tabletInfo, err)
	}

	conn, err := tabletconn.GetDialer()(ctx, tabletInfo.Tablet, grpcclient.FailFast(false))
	if err != nil {
		return fmt.Errorf("cannot connect to tablet %v: %v", alias, err)
	}

	var lastSeenDelay time.Duration
	err = conn.StreamHealth(ctx, func(shr *querypb.StreamHealthResponse) error {
		stats := shr.RealtimeStats
		if stats == nil {
			return fmt.Errorf("health record does not include RealtimeStats message. tablet: %v health record: %v", alias, shr)
		}
		if stats.HealthError != "" {
			return fmt.Errorf("tablet is not healthy. tablet: %v health record: %v", alias, shr)
		}
		if stats.BinlogPlayersCount == 0 {
			return fmt.Errorf("no filtered replication running on tablet: %v health record: %v", alias, shr)
		}

		delaySecs := stats.FilteredReplicationLagSeconds
		lastSeenDelay = time.Duration(delaySecs) * time.Second
		if lastSeenDelay < 0 {
			return fmt.Errorf("last seen delay should never be negative. tablet: %v delay: %v", alias, lastSeenDelay)
		}
		if lastSeenDelay <= maxDelay {
			wr.Logger().Printf("Filtered replication on tablet: %v has caught up. Last seen delay: %.1f seconds\n", alias, lastSeenDelay.Seconds())
			return io.EOF
		}
		wr.Logger().Printf("Waiting for filtered replication to catch up on tablet: %v Last seen delay: %.1f seconds\n", alias, lastSeenDelay.Seconds())
		return nil
	})
	if err != nil {
		return fmt.Errorf("could not stream health records from tablet: %v err: %v", alias, err)
	}

View on GitHub (pinned to 01a25a7d17)

Solutions

  1. Verify the vreplication workflow is running with `vtctldclient VReplicationExec <tablet> 'show workflows'`
  2. Start or restart the workflow (MoveTables Create) so binlog players are active on the tablet
  3. If replication already caught up and players stopped, skip the wait — the workflow may have completed normally
  4. Confirm you are targeting the correct tablet alias and keyspace for the workflow

Example fix

// before: waiting although no players exist
wr.WaitForFilteredReplication(ctx, alias, maxDelay)
// after: check players exist before waiting
if count, _ := getBinlogPlayersCount(ctx, wr, alias); count == 0 {
	return fmt.Errorf("no binlog players on %s; start the workflow first", alias)
}
wr.WaitForFilteredReplication(ctx, alias, maxDelay)
Defensive patterns

Strategy: validation

Validate before calling

players, err := getBinlogPlayersCount(ctx, wr, alias)
if err != nil {
	return err
}
if players == 0 {
	return fmt.Errorf("no filtered replication on %s; start workflow first", alias)
}

Type guard

func filteredReplicationRunning(stats *querypb.RealtimeStats) bool {
	return stats != nil && stats.BinlogPlayersCount > 0
}

Try / catch

if err := wr.WaitForFilteredReplication(ctx, alias, maxDelay); err != nil {
	if strings.Contains(err.Error(), "no filtered replication running") {
		// verify/restart the vreplication workflow before retrying
	}
	return err
}

Prevention

When it happens

Trigger: Calling WaitForFilteredReplication on a tablet where the vreplication/binlog-player workflow is not started, has already completed and stopped, or was cancelled — RealtimeStats.BinlogPlayersCount == 0.

Common situations: Running MoveTables SwitchWrites before the vreplication stream finished; workflow cancelled or purged before waiting for catch-up; wrong keyspace/workflow name so no player is active on the specified tablet; legacy binlog-player filtered replication not started after a tablet restart.

Related errors


AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01). Data as JSON: /api/errors/c4c019b34da49bb6. Report an issue: GitHub.