Change the logic of getting vchannel position (#5502)
Datanode send `SaveBinlogPath` request after every segment flush finish
with the binlog paths and dml/ddl position. But the flush of segments is
not sorted. So we sort the segments according to segment id and find the
largest segment id with not nil dml position which is the position of
the msgstream to recover.
Signed-off-by:
sunby <bingyi.sun@zilliz.com>
Showing
- internal/dataservice/binlog_helper.go 16 additions, 54 deletionsinternal/dataservice/binlog_helper.go
- internal/dataservice/grpc_services.go 10 additions, 5 deletionsinternal/dataservice/grpc_services.go
- internal/dataservice/meta.go 34 additions, 22 deletionsinternal/dataservice/meta.go
- internal/dataservice/meta_test.go 7 additions, 5 deletionsinternal/dataservice/meta_test.go
- internal/dataservice/segment_allocator.go 6 additions, 19 deletionsinternal/dataservice/segment_allocator.go
- internal/dataservice/server.go 2 additions, 17 deletionsinternal/dataservice/server.go
- internal/dataservice/server_test.go 7 additions, 12 deletionsinternal/dataservice/server_test.go
- internal/dataservice/stats_handler.go 0 additions, 46 deletionsinternal/dataservice/stats_handler.go
- internal/proto/data_service.proto 2 additions, 2 deletionsinternal/proto/data_service.proto
- internal/proto/datapb/data_service.pb.go 153 additions, 153 deletionsinternal/proto/datapb/data_service.pb.go
Please register or sign in to comment