Skip to content

Commit

Permalink
Finish vstream_manager
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <[email protected]>
  • Loading branch information
mattlord committed Jan 22, 2025
1 parent a136b86 commit 2008d1c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions go/vt/vtgate/vstream_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,8 @@ func (vs *vstream) getJournalEvent(ctx context.Context, sgtid *binlogdatapb.Shar
mode = matchAll
je.participants[inner] = false
case matchNone:
return nil, fmt.Errorf("not all journaling participants are in the stream: journal: %v, stream: %v", journal.Participants, vs.vgtid.ShardGtids)
return nil, vterrors.Errorf(vtrpcpb.Code_FAILED_PRECONDITION, "not all journaling participants are in the stream: journal: %v, stream: %v",
journal.Participants, vs.vgtid.ShardGtids)
}
continue nextParticipant
}
Expand All @@ -965,7 +966,8 @@ func (vs *vstream) getJournalEvent(ctx context.Context, sgtid *binlogdatapb.Shar
case undecided, matchNone:
mode = matchNone
case matchAll:
return nil, fmt.Errorf("not all journaling participants are in the stream: journal: %v, stream: %v", journal.Participants, vs.vgtid.ShardGtids)
return nil, vterrors.Errorf(vtrpcpb.Code_FAILED_PRECONDITION, "not all journaling participants are in the stream: journal: %v, stream: %v",
journal.Participants, vs.vgtid.ShardGtids)
}
}
if mode == matchNone {
Expand Down Expand Up @@ -1037,7 +1039,8 @@ func (vs *vstream) keyspaceHasBeenResharded(ctx context.Context, keyspace string
for _, s := range ksShardGTIDs {
shard := shards[s.GetShard()]
if shard == nil {
return false, vterrors.Errorf(vtrpcpb.Code_FAILED_PRECONDITION, "shard provided in VGTID, %s, not found in the %s keyspace", s.GetShard(), keyspace)
return false, vterrors.Errorf(vtrpcpb.Code_FAILED_PRECONDITION, "shard provided in VGTID, %s, not found in the %s keyspace",
s.GetShard(), keyspace)
}
if !shard.GetIsPrimaryServing() {
reshardPossible = true
Expand Down

0 comments on commit 2008d1c

Please sign in to comment.