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

PBM-815: physical restore + logical PITR #844

Merged
merged 23 commits into from
Jul 5, 2023

PBM-815: fix dist txn for logical

6503468
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

PBM-815: physical restore + logical PITR #844

PBM-815: fix dist txn for logical
6503468
Select commit
Loading
Failed to load commit list.
GitHub Actions / golangci failed Jul 4, 2023 in 1s

reviewdog [golangci] report

reported by reviewdog 🐶

Findings (4)

agent/restore.go|357 col 16| Error return value of lock.Release is not checked (errcheck)
pbm/restore/physical.go|1548 col 23| func (*PhysRestore).checkTxn is unused (unused)
pbm/restore/physical.go|1615 col 23| func (*PhysRestore).setTxn is unused (unused)
pbm/restore/physical.go|1674 col 23| func (*PhysRestore).checkWaitingTxns is unused (unused)

Filtered Findings (34)

pbm/config.go|225 col 13| Error return value of p.GetConfig is not checked (errcheck)
pbm/node.go|275 col 30| Error return value of cn.Disconnect is not checked (errcheck)
pbm/node.go|367 col 30| Error return value of cn.Disconnect is not checked (errcheck)
pbm/oplog/restore.go|697 col 32| Error return value of o.indexCatalog.DeleteIndexes is not checked (errcheck)
e2e-tests/pkg/tests/sharded/trx.go|109 col 22| Error return value of sess.WithTransaction is not checked (errcheck)
e2e-tests/pkg/tests/sharded/trx.go|133 col 19| Error return value of mongo.WithSession is not checked (errcheck)
e2e-tests/pkg/tests/sharded/trx.go|140 col 26| Error return value of sess.AbortTransaction is not checked (errcheck)
e2e-tests/pkg/tests/sharded/trx_phys.go|86 col 22| Error return value of sess.WithTransaction is not checked (errcheck)
e2e-tests/pkg/tests/sharded/trx_phys.go|106 col 19| Error return value of mongo.WithSession is not checked (errcheck)
e2e-tests/pkg/tests/sharded/trx_phys.go|113 col 26| Error return value of sess.AbortTransaction is not checked (errcheck)
speedt/b_test.go|10 col 19| Error return value of io.Discard.Write is not checked (errcheck)
speedt/b_test.go|16 col 19| Error return value of io.Discard.Write is not checked (errcheck)
cli/status.go|238 col 21| Error return value of rconn.Disconnect is not checked (errcheck)
cli/status.go|243 col 20| Error return value of rconn.Disconnect is not checked (errcheck)
cmd/pbm-speed-test/main.go|92 col 43| Error return value of (*go.mongodb.org/mongo-driver/mongo.Client).Disconnect is not checked (errcheck)
cmd/pbm-speed-test/main.go|118 col 42| Error return value of (*go.mongodb.org/mongo-driver/mongo.Client).Disconnect is not checked (errcheck)
cmd/pbm-speed-test/main.go|124 col 42| Error return value of pbmClient.Conn.Disconnect is not checked (errcheck)
pbm/oplog/restore.go|348 col 6| func isPrepareTxn is unused (unused)
pbm/restore/logical.go|53 col 2| field oplog is unused (unused)
pbm/restore/logical.go|1032 col 19| func (*Restore).replayChunk is unused (unused)
cli/delete.go|351 col 6| func findAdjustedTS is unused (unused)
cli/delete.go|376 col 6| func findBaseSnapshotRestoreTS is unused (unused)
pbm/log/log.go|329 col 19| composites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields (govet)
pbm/log/log.go|331 col 19| composites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields (govet)
pbm/log/log.go|335 col 27| composites: go.mongodb.org/mongo-driver/bson/primitive.E struct literal uses unkeyed fields (govet)
pbm/pitr/pitr.go|272 col 10| composites: github.com/percona/percona-backup-mongodb/pbm/oplog.ErrInsuffRange struct literal uses unkeyed fields (govet)
e2e-tests/cmd/pbm-test/run.go|116 col 12| composites: go.mongodb.org/mongo-driver/bson/primitive.Timestamp struct literal uses unkeyed fields (govet)
e2e-tests/cmd/pbm-test/run.go|120 col 12| composites: go.mongodb.org/mongo-driver/bson/primitive.Timestamp struct literal uses unkeyed fields (govet)
pbm/pitr_test.go|14 col 13| composites: go.mongodb.org/mongo-driver/bson/primitive.Timestamp struct literal uses unkeyed fields (govet)
speedt/speedt.go|153 col 8| composites: reflect.SliceHeader struct literal uses unkeyed fields (govet)
speedt/speedt.go|154 col 35| unsafeptr: possible misuse of reflect.SliceHeader (govet)
e2e-tests/cmd/pbm-test/run_physical.go|16 col 2| ineffectual assignment to storage (ineffassign)
cli/restore.go|9 col 2| SA1019: "io/ioutil" has been deprecated since Go 1.19: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)
pbm/restore/physical.go|9 col 2| SA1019: "io/ioutil" has been deprecated since Go 1.19: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)

Annotations

Check failure on line 357 in agent/restore.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] agent/restore.go#L357

Error return value of `lock.Release` is not checked (errcheck)
Raw output
agent/restore.go:357:16: Error return value of `lock.Release` is not checked (errcheck)
			lock.Release()
			            ^

Check failure on line 1548 in pbm/restore/physical.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pbm/restore/physical.go#L1548

func `(*PhysRestore).checkTxn` is unused (unused)
Raw output
pbm/restore/physical.go:1548:23: func `(*PhysRestore).checkTxn` is unused (unused)
func (r *PhysRestore) checkTxn(txn pbm.RestoreTxn) (pbm.TxnState, error) {
                      ^

Check failure on line 1615 in pbm/restore/physical.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pbm/restore/physical.go#L1615

func `(*PhysRestore).setTxn` is unused (unused)
Raw output
pbm/restore/physical.go:1615:23: func `(*PhysRestore).setTxn` is unused (unused)
func (r *PhysRestore) setTxn(txn pbm.RestoreTxn) error {
                      ^

Check failure on line 1674 in pbm/restore/physical.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pbm/restore/physical.go#L1674

func `(*PhysRestore).checkWaitingTxns` is unused (unused)
Raw output
pbm/restore/physical.go:1674:23: func `(*PhysRestore).checkWaitingTxns` is unused (unused)
func (r *PhysRestore) checkWaitingTxns(observedTxn map[string]struct{}, o *oplog.OplogRestore) error {
                      ^