Skip to content

Commit 2008d1c

Browse files
committed
Finish vstream_manager
Signed-off-by: Matt Lord <mattalord@gmail.com>
1 parent a136b86 commit 2008d1c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

go/vt/vtgate/vstream_manager.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,8 @@ func (vs *vstream) getJournalEvent(ctx context.Context, sgtid *binlogdatapb.Shar
956956
mode = matchAll
957957
je.participants[inner] = false
958958
case matchNone:
959-
return nil, fmt.Errorf("not all journaling participants are in the stream: journal: %v, stream: %v", journal.Participants, vs.vgtid.ShardGtids)
959+
return nil, vterrors.Errorf(vtrpcpb.Code_FAILED_PRECONDITION, "not all journaling participants are in the stream: journal: %v, stream: %v",
960+
journal.Participants, vs.vgtid.ShardGtids)
960961
}
961962
continue nextParticipant
962963
}
@@ -965,7 +966,8 @@ func (vs *vstream) getJournalEvent(ctx context.Context, sgtid *binlogdatapb.Shar
965966
case undecided, matchNone:
966967
mode = matchNone
967968
case matchAll:
968-
return nil, fmt.Errorf("not all journaling participants are in the stream: journal: %v, stream: %v", journal.Participants, vs.vgtid.ShardGtids)
969+
return nil, vterrors.Errorf(vtrpcpb.Code_FAILED_PRECONDITION, "not all journaling participants are in the stream: journal: %v, stream: %v",
970+
journal.Participants, vs.vgtid.ShardGtids)
969971
}
970972
}
971973
if mode == matchNone {
@@ -1037,7 +1039,8 @@ func (vs *vstream) keyspaceHasBeenResharded(ctx context.Context, keyspace string
10371039
for _, s := range ksShardGTIDs {
10381040
shard := shards[s.GetShard()]
10391041
if shard == nil {
1040-
return false, vterrors.Errorf(vtrpcpb.Code_FAILED_PRECONDITION, "shard provided in VGTID, %s, not found in the %s keyspace", s.GetShard(), keyspace)
1042+
return false, vterrors.Errorf(vtrpcpb.Code_FAILED_PRECONDITION, "shard provided in VGTID, %s, not found in the %s keyspace",
1043+
s.GetShard(), keyspace)
10411044
}
10421045
if !shard.GetIsPrimaryServing() {
10431046
reshardPossible = true

0 commit comments

Comments
 (0)