mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Improve 'shouldn't ever happen' error messages
This commit is contained in:
parent
fd65384faa
commit
fa77a36e83
1 changed files with 3 additions and 3 deletions
|
|
@ -1078,7 +1078,7 @@ func (srv *Server) StartTransaction(ctx context.Context, id string, timeout time
|
|||
return nil, ErrNodeNotCoordinator
|
||||
}
|
||||
if remote && (node.IsCoordinator || len(srv.cluster.Nodes()) == 1) {
|
||||
return nil, errors.New("got a remote start call to coordinator or single node cluster... shouldn't ever happen")
|
||||
return nil, errors.New("unexpected remote start call to coordinator or single node cluster")
|
||||
}
|
||||
|
||||
if remote {
|
||||
|
|
@ -1124,7 +1124,7 @@ func (srv *Server) FinishTransaction(ctx context.Context, id string, remote bool
|
|||
return nil, ErrNodeNotCoordinator
|
||||
}
|
||||
if remote && (node.IsCoordinator || len(srv.cluster.Nodes()) == 1) {
|
||||
return nil, errors.New("got a remote finish call to coordinator or single node cluster... shouldn't ever happen")
|
||||
return nil, errors.New("unexpected remote finish call to coordinator or single node cluster")
|
||||
}
|
||||
|
||||
if remote {
|
||||
|
|
@ -1163,7 +1163,7 @@ func (srv *Server) GetTransaction(ctx context.Context, id string, remote bool) (
|
|||
}
|
||||
|
||||
if remote && (node.IsCoordinator || len(srv.cluster.Nodes()) == 1) {
|
||||
return nil, errors.New("got a remote finish call to coordinator or single node cluster... shouldn't ever happen")
|
||||
return nil, errors.New("unexpected remote get call to coordinator or single node cluster")
|
||||
}
|
||||
|
||||
trns, err := srv.holder.GetTransaction(ctx, id)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue