Skip to content

Commit c1a8fa3

Browse files
disqpull[bot]
authored andcommitted
fix: Correct error message on Read failure (#1680)
`failed to sync records: %w` is already used, by `Server.Sync()` Co-authored-by: Kemal Hadimli <disq@users.noreply.github.com>
1 parent a6c81aa commit c1a8fa3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

internal/servers/plugin/v3/plugin.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func (s *Server) Init(ctx context.Context, req *pb.Init_Request) (*pb.Init_Respo
7979

8080
func (s *Server) Read(req *pb.Read_Request, stream pb.Plugin_ReadServer) error {
8181
records := make(chan arrow.Record)
82-
var syncErr error
82+
var readErr error
8383
ctx := stream.Context()
8484

8585
sc, err := pb.NewSchemaFromBytes(req.Table)
@@ -94,7 +94,7 @@ func (s *Server) Read(req *pb.Read_Request, stream pb.Plugin_ReadServer) error {
9494
defer close(records)
9595
err := s.Plugin.Read(ctx, table, records)
9696
if err != nil {
97-
syncErr = fmt.Errorf("failed to sync records: %w", err)
97+
readErr = fmt.Errorf("failed to read records: %w", err)
9898
}
9999
}()
100100

@@ -111,7 +111,7 @@ func (s *Server) Read(req *pb.Read_Request, stream pb.Plugin_ReadServer) error {
111111
}
112112
}
113113

114-
return syncErr
114+
return readErr
115115
}
116116

117117
func (s *Server) Sync(req *pb.Sync_Request, stream pb.Plugin_SyncServer) error {

0 commit comments

Comments
 (0)