Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
glorv committed May 27, 2021
1 parent fd12d0a commit ec92e04
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 43 deletions.
8 changes: 0 additions & 8 deletions go.mod1
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,10 @@ require (
github.com/pingcap/check v0.0.0-20200212061837-5e12011dc712
github.com/pingcap/errors v0.11.5-0.20201126102027-b0a155152ca3
github.com/pingcap/failpoint v0.0.0-20210316064728-7acb0f0a3dfd
<<<<<<< HEAD
github.com/pingcap/kvproto v0.0.0-20210308063835-39b884695fb8
github.com/pingcap/log v0.0.0-20201112100606-8f1e84a3abc8
github.com/pingcap/parser v0.0.0-20210325072920-0d17053a8a69
github.com/pingcap/sysutil v0.0.0-20210315073920-cc0985d983a3 // indirect
github.com/pingcap/tidb v1.1.0-beta.0.20210416032353-4c49754750e5
=======
github.com/pingcap/kvproto v0.0.0-20210507074444-0ec2d0dc2e4b
github.com/pingcap/log v0.0.0-20210317133921-96f4fcab92a4
github.com/pingcap/parser v0.0.0-20210513020953-ae2c4497c07b
github.com/pingcap/tidb v1.1.0-beta.0.20210517044538-8ad868f801fc
>>>>>>> 179e15db (lightning/restore: support ingset multi ssts for same range (#1089))
github.com/pingcap/tidb-tools v4.0.9-0.20201127090955-2707c97b3853+incompatible
github.com/pingcap/tipb v0.0.0-20210326161441-1164ca065d1b
github.com/prometheus/client_golang v1.5.1
Expand Down
5 changes: 0 additions & 5 deletions go.sum1
Original file line number Diff line number Diff line change
Expand Up @@ -474,14 +474,9 @@ github.com/pingcap/kvproto v0.0.0-20191211054548-3c6b38ea5107/go.mod h1:WWLmULLO
github.com/pingcap/kvproto v0.0.0-20200411081810-b85805c9476c/go.mod h1:IOdRDPLyda8GX2hE/jO7gqaCV/PNFh8BZQCQZXfIOqI=
github.com/pingcap/kvproto v0.0.0-20200810113304-6157337686b1/go.mod h1:IOdRDPLyda8GX2hE/jO7gqaCV/PNFh8BZQCQZXfIOqI=
github.com/pingcap/kvproto v0.0.0-20210219064844-c1844a4775d6/go.mod h1:IOdRDPLyda8GX2hE/jO7gqaCV/PNFh8BZQCQZXfIOqI=
<<<<<<< HEAD
github.com/pingcap/kvproto v0.0.0-20210308063835-39b884695fb8 h1:t72qxPxunoKykkAuO5glpWGdoP+RmvKvX0lvmyFV0fI=
github.com/pingcap/kvproto v0.0.0-20210308063835-39b884695fb8/go.mod h1:IOdRDPLyda8GX2hE/jO7gqaCV/PNFh8BZQCQZXfIOqI=
=======
github.com/pingcap/kvproto v0.0.0-20210507054410-a8152f8a876c/go.mod h1:IOdRDPLyda8GX2hE/jO7gqaCV/PNFh8BZQCQZXfIOqI=
github.com/pingcap/kvproto v0.0.0-20210507074444-0ec2d0dc2e4b h1:e42N26QQjVA/obDrFFapJ1YLB+j5aPQOh7R+cIGR9Bk=
github.com/pingcap/kvproto v0.0.0-20210507074444-0ec2d0dc2e4b/go.mod h1:IOdRDPLyda8GX2hE/jO7gqaCV/PNFh8BZQCQZXfIOqI=
>>>>>>> 179e15db (lightning/restore: support ingset multi ssts for same range (#1089))
github.com/pingcap/log v0.0.0-20191012051959-b742a5d432e9/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8=
github.com/pingcap/log v0.0.0-20200511115504-543df19646ad/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8=
github.com/pingcap/log v0.0.0-20201112100606-8f1e84a3abc8 h1:M+DNpOu/I3uDmwee6vcnoPd6GgSMqND4gxvDQ/W584U=
Expand Down
32 changes: 2 additions & 30 deletions pkg/lightning/backend/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"context"
"encoding/binary"
"encoding/json"
"github.com/pingcap/br/pkg/logutil"
"io"
"math"
"os"
Expand Down Expand Up @@ -491,8 +492,6 @@ func NewLocalBackend(
return backend.MakeBackend(local), nil
}

<<<<<<< HEAD
=======
func (local *local) checkMultiIngestSupport(ctx context.Context, pdClient pd.Client) error {
stores, err := conn.GetAllTiKVStores(ctx, pdClient, conn.SkipTiFlash)
if err != nil {
Expand Down Expand Up @@ -521,17 +520,6 @@ func (local *local) checkMultiIngestSupport(ctx context.Context, pdClient pd.Cli
return nil
}

// rlock read locks a local file and returns the File instance if it exists.
func (local *local) rLockEngine(engineId uuid.UUID) *File {
if e, ok := local.engines.Load(engineId); ok {
engine := e.(*File)
engine.rLock()
return engine
}
return nil
}

>>>>>>> 179e15db (lightning/restore: support ingset multi ssts for same range (#1089))
// lock locks a local file and returns the File instance if it exists.
func (local *local) lockEngine(engineID uuid.UUID, state importMutexState) *File {
if e, ok := local.engines.Load(engineID); ok {
Expand Down Expand Up @@ -945,16 +933,10 @@ func (local *local) Ingest(ctx context.Context, metas []*sst.SSTMeta, region *sp
resp, err := cli.Ingest(ctx, req)
return resp, errors.Trace(err)
}
<<<<<<< HEAD
resp, err := cli.Ingest(ctx, req)
if err != nil {
return nil, err
=======

req := &sst.MultiIngestRequest{
Context: reqCtx,
Ssts: metas,
>>>>>>> 179e15db (lightning/restore: support ingset multi ssts for same range (#1089))
}
resp, err := cli.MultiIngest(ctx, req)
return resp, errors.Trace(err)
Expand Down Expand Up @@ -1248,7 +1230,7 @@ loopWrite:
}

if len(metas) == 0 {
return nil
return nil, nil
}

batch := 1
Expand Down Expand Up @@ -1296,13 +1278,8 @@ loopWrite:
if common.IsContextCanceledError(err) {
return nil, err
}
<<<<<<< HEAD
log.L().Warn("ingest failed", log.ShortError(err), log.ZapRedactReflect("meta", meta),
log.ZapRedactReflect("region", region))
=======
log.L().Warn("ingest failed", log.ShortError(err), logutil.SSTMetas(ingestMetas),
logutil.Region(region.Region), logutil.Leader(region.Leader))
>>>>>>> 179e15db (lightning/restore: support ingset multi ssts for same range (#1089))
errCnt++
continue
}
Expand All @@ -1318,13 +1295,8 @@ loopWrite:
}
switch retryTy {
case retryNone:
<<<<<<< HEAD
log.L().Warn("ingest failed noretry", log.ShortError(err), log.ZapRedactReflect("meta", meta),
log.ZapRedactReflect("region", region))
=======
log.L().Warn("ingest failed noretry", log.ShortError(err), logutil.SSTMetas(ingestMetas),
logutil.Region(region.Region), logutil.Leader(region.Leader))
>>>>>>> 179e15db (lightning/restore: support ingset multi ssts for same range (#1089))
// met non-retryable error retry whole Write procedure
return remainRange, err
case retryWrite:
Expand Down

0 comments on commit ec92e04

Please sign in to comment.