Skip to content

Commit

Permalink
Revert "Improve index correction performance (#2234)"
Browse files Browse the repository at this point in the history
This reverts commit dcf2064.
  • Loading branch information
ykadowak committed Nov 30, 2023
1 parent 32394c8 commit 1e2e51e
Show file tree
Hide file tree
Showing 16 changed files with 776 additions and 1,708 deletions.
910 changes: 443 additions & 467 deletions apis/docs/v1/docs.md

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion apis/grpc/v1/agent/core/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ const (
SaveIndexRPCName = "SaveIndex"
CreateAndSaveIndexRPCName = "CreateAndSaveIndex"
IndexInfoRPCName = "IndexInfo"
GetTimestampRPCName = "GetTimestamp"
)
41 changes: 15 additions & 26 deletions apis/grpc/v1/agent/core/agent.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 0 additions & 38 deletions apis/grpc/v1/agent/core/agent_vtproto.pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ type AgentClient interface {
CreateAndSaveIndex(ctx context.Context, in *payload.Control_CreateIndexRequest, opts ...grpc.CallOption) (*payload.Empty, error)
// Represent the RPC to get the agent index information.
IndexInfo(ctx context.Context, in *payload.Empty, opts ...grpc.CallOption) (*payload.Info_Index_Count, error)
// Represent the RPC to get the vector metadata. This RPC is mainly used for index correction process
GetTimestamp(ctx context.Context, in *payload.Object_GetTimestampRequest, opts ...grpc.CallOption) (*payload.Object_Timestamp, error)
}

type agentClient struct {
Expand Down Expand Up @@ -98,15 +96,6 @@ func (c *agentClient) IndexInfo(ctx context.Context, in *payload.Empty, opts ...
return out, nil
}

func (c *agentClient) GetTimestamp(ctx context.Context, in *payload.Object_GetTimestampRequest, opts ...grpc.CallOption) (*payload.Object_Timestamp, error) {
out := new(payload.Object_Timestamp)
err := c.cc.Invoke(ctx, "/core.v1.Agent/GetTimestamp", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}

// AgentServer is the server API for Agent service.
// All implementations must embed UnimplementedAgentServer
// for forward compatibility
Expand All @@ -119,8 +108,6 @@ type AgentServer interface {
CreateAndSaveIndex(context.Context, *payload.Control_CreateIndexRequest) (*payload.Empty, error)
// Represent the RPC to get the agent index information.
IndexInfo(context.Context, *payload.Empty) (*payload.Info_Index_Count, error)
// Represent the RPC to get the vector metadata. This RPC is mainly used for index correction process
GetTimestamp(context.Context, *payload.Object_GetTimestampRequest) (*payload.Object_Timestamp, error)
mustEmbedUnimplementedAgentServer()
}

Expand All @@ -140,9 +127,6 @@ func (UnimplementedAgentServer) CreateAndSaveIndex(context.Context, *payload.Con
func (UnimplementedAgentServer) IndexInfo(context.Context, *payload.Empty) (*payload.Info_Index_Count, error) {
return nil, status.Errorf(codes.Unimplemented, "method IndexInfo not implemented")
}
func (UnimplementedAgentServer) GetTimestamp(context.Context, *payload.Object_GetTimestampRequest) (*payload.Object_Timestamp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetTimestamp not implemented")
}
func (UnimplementedAgentServer) mustEmbedUnimplementedAgentServer() {}

// UnsafeAgentServer may be embedded to opt out of forward compatibility for this service.
Expand Down Expand Up @@ -228,24 +212,6 @@ func _Agent_IndexInfo_Handler(srv interface{}, ctx context.Context, dec func(int
return interceptor(ctx, in, info, handler)
}

func _Agent_GetTimestamp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(payload.Object_GetTimestampRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AgentServer).GetTimestamp(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/core.v1.Agent/GetTimestamp",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AgentServer).GetTimestamp(ctx, req.(*payload.Object_GetTimestampRequest))
}
return interceptor(ctx, in, info, handler)
}

// Agent_ServiceDesc is the grpc.ServiceDesc for Agent service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
Expand All @@ -269,10 +235,6 @@ var Agent_ServiceDesc = grpc.ServiceDesc{
MethodName: "IndexInfo",
Handler: _Agent_IndexInfo_Handler,
},
{
MethodName: "GetTimestamp",
Handler: _Agent_GetTimestamp_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "apis/proto/v1/agent/core/agent.proto",
Expand Down
Loading

0 comments on commit 1e2e51e

Please sign in to comment.