Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unused fields in s3writer #20844

Merged
merged 7 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pkg/common/morpc/backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -819,10 +819,10 @@ func TestCannotBusyLoopIfWriteCIsFull(t *testing.T) {
for i := 0; i < 10; i++ {
req := newTestMessage(1)
f, err := b.Send(ctx, req)
assert.NoError(t, err)

_, err = f.Get()
assert.NoError(t, err)
if err == nil { //ignore timeout
_, err = f.Get()
assert.NoError(t, err)
}
}
}()
}
Expand Down
876 changes: 364 additions & 512 deletions pkg/pb/pipeline/pipeline.pb.go

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion pkg/sql/colexec/multi_update/s3writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ func newS3Writer(update *MultiUpdate) (*s3Writer, error) {
tableCount := len(update.MultiUpdateCtx)
writer := &s3Writer{
cacheBatchs: batch.NewCompactBatchs(),
segmentMap: update.SegmentMap,
updateCtxInfos: update.ctr.updateCtxInfos,
seqnums: make([][]uint16, 0, tableCount),
sortIdxs: make([]int, 0, tableCount),
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/colexec/multi_update/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ type MultiUpdate struct {

Engine engine.Engine

SegmentMap map[string]int32
// SegmentMap map[string]int32

vm.OperatorBase
}
Expand Down
2 changes: 0 additions & 2 deletions pkg/sql/compile/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,6 @@ func dupOperator(sourceOp vm.Operator, index int, maxParallel int) vm.Operator {
op.Action = t.Action
op.IsOnduplicateKeyUpdate = t.IsOnduplicateKeyUpdate
op.Engine = t.Engine
op.SegmentMap = t.SegmentMap
op.SetInfo(&info)
return op
case vm.DedupJoin:
Expand Down Expand Up @@ -794,7 +793,6 @@ func constructLockOp(n *plan.Node, eng engine.Engine) (*lockop.LockOp, error) {
func constructMultiUpdate(n *plan.Node, eg engine.Engine) *multi_update.MultiUpdate {
arg := multi_update.NewArgument()
arg.Engine = eg
arg.SegmentMap = colexec.Get().GetCnSegmentMap()

arg.MultiUpdateCtx = make([]*multi_update.MultiUpdateCtx, len(n.UpdateCtxList))
for i, updateCtx := range n.UpdateCtxList {
Expand Down
2 changes: 0 additions & 2 deletions pkg/sql/compile/remoterun.go
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,6 @@ func convertToPipelineInstruction(op vm.Operator, proc *process.Process, ctx *sc
AffectedRows: t.GetAffectedRows(),
Action: uint32(t.Action),
UpdateCtxList: updateCtxList,
SegmentMap: t.SegmentMap,
}
case *postdml.PostDml:
in.PostDml = &pipeline.PostDml{
Expand Down Expand Up @@ -1341,7 +1340,6 @@ func convertToVmOperator(opr *pipeline.Instruction, ctx *scopeContext, eng engin
t := opr.GetMultiUpdate()
arg.SetAffectedRows(t.AffectedRows)
arg.Action = multi_update.UpdateAction(t.Action)
arg.SegmentMap = t.SegmentMap

arg.MultiUpdateCtx = make([]*multi_update.MultiUpdateCtx, len(t.UpdateCtxList))
for i, muCtx := range t.UpdateCtxList {
Expand Down
3 changes: 1 addition & 2 deletions proto/pipeline.proto
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,7 @@ message MultiUpdate {
uint32 Action = 2;
uint32 IBucket = 3;
uint32 NBucket = 4;
map<string,int32> SegmentMap = 5;
repeated plan.UpdateCtx update_ctx_list = 6;
repeated plan.UpdateCtx update_ctx_list = 5;
}

message Array{
Expand Down
Loading