From d43026ed169ccaccccb0c92d2d5022e1a43a8832 Mon Sep 17 00:00:00 2001 From: Neil Shen Date: Fri, 6 Mar 2020 15:27:45 +0800 Subject: [PATCH 1/3] rtree: move checkFile into backup Signed-off-by: Neil Shen --- pkg/{rtree => backup}/check.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) rename pkg/{rtree => backup}/check.go (67%) diff --git a/pkg/rtree/check.go b/pkg/backup/check.go similarity index 67% rename from pkg/rtree/check.go rename to pkg/backup/check.go index 08c98d2f4..38b2d927d 100644 --- a/pkg/rtree/check.go +++ b/pkg/backup/check.go @@ -1,4 +1,6 @@ -package rtree +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + +package backup import ( "encoding/hex" @@ -6,14 +8,16 @@ import ( "github.com/google/btree" "github.com/pingcap/log" "go.uber.org/zap" + + "github.com/pingcap/br/pkg/rtree" ) -// CheckDupFiles checks if there are any files are duplicated. -func CheckDupFiles(rangeTree *RangeTree) { +// checkDupFiles checks if there are any files are duplicated. +func checkDupFiles(rangeTree *rtree.RangeTree) { // Name -> SHA256 files := make(map[string][]byte) rangeTree.Ascend(func(i btree.Item) bool { - rg := i.(*Range) + rg := i.(*rtree.Range) for _, f := range rg.Files { old, ok := files[f.Name] if ok { From c042358345b93298b3f6d717975fa024ea8703df Mon Sep 17 00:00:00 2001 From: Neil Shen Date: Fri, 6 Mar 2020 15:28:12 +0800 Subject: [PATCH 2/3] *: add license header Signed-off-by: Neil Shen --- LICENSE.md | 2 +- cmd/backup.go | 2 ++ cmd/cmd.go | 2 ++ cmd/restore.go | 2 ++ cmd/validate.go | 2 ++ pkg/backup/client.go | 4 +++- pkg/backup/client_test.go | 2 ++ pkg/backup/metrics.go | 2 ++ pkg/backup/push.go | 2 ++ pkg/backup/safe_point.go | 2 ++ pkg/backup/safe_point_test.go | 2 ++ pkg/backup/schema.go | 2 ++ pkg/backup/schema_test.go | 2 ++ pkg/checksum/executor.go | 2 ++ pkg/checksum/executor_test.go | 2 ++ pkg/conn/conn.go | 2 ++ pkg/conn/conn_test.go | 2 ++ pkg/glue/glue.go | 2 ++ pkg/gluetidb/glue.go | 2 ++ pkg/mock/mock_cluster.go | 2 ++ pkg/mock/mock_cluster_test.go | 2 ++ pkg/restore/backoff.go | 2 ++ pkg/restore/backoff_test.go | 2 ++ pkg/restore/client.go | 2 ++ pkg/restore/client_test.go | 2 ++ pkg/restore/db.go | 2 ++ pkg/restore/db_test.go | 2 ++ pkg/restore/import.go | 2 ++ pkg/restore/range.go | 2 ++ pkg/restore/range_test.go | 2 ++ pkg/restore/split.go | 2 ++ pkg/restore/split_client.go | 2 ++ pkg/restore/split_test.go | 2 ++ pkg/restore/util.go | 2 ++ pkg/restore/util_test.go | 2 ++ pkg/rtree/rtree.go | 13 +------------ pkg/rtree/rtree_test.go | 13 +------------ pkg/storage/flags.go | 2 ++ pkg/storage/gcs.go | 2 ++ pkg/storage/gcs_test.go | 2 ++ pkg/storage/local.go | 2 ++ pkg/storage/local_unix.go | 2 ++ pkg/storage/local_windows.go | 2 ++ pkg/storage/noop.go | 2 ++ pkg/storage/parse.go | 2 ++ pkg/storage/parse_test.go | 2 ++ pkg/storage/s3.go | 2 ++ pkg/storage/s3_test.go | 2 ++ pkg/storage/storage.go | 2 ++ pkg/summary/collector.go | 2 ++ pkg/summary/collector_test.go | 2 ++ pkg/summary/summary.go | 2 ++ pkg/task/backup.go | 2 ++ pkg/task/backup_raw.go | 2 ++ pkg/task/common.go | 2 ++ pkg/task/restore.go | 2 ++ pkg/utils/key.go | 2 ++ pkg/utils/key_test.go | 2 ++ pkg/utils/progress.go | 2 ++ pkg/utils/progress_test.go | 2 ++ pkg/utils/retry.go | 2 ++ pkg/utils/schema.go | 2 ++ pkg/utils/schema_test.go | 2 ++ pkg/utils/tso.go | 2 ++ pkg/utils/unit.go | 2 ++ pkg/utils/unit_test.go | 2 ++ pkg/utils/utils_test.go | 2 ++ pkg/utils/version.go | 2 ++ pkg/utils/worker.go | 2 ++ 69 files changed, 136 insertions(+), 26 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index 675c2ec95..91ed1b93f 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -186,7 +186,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright {} + Copyright PingCAP, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/backup.go b/cmd/backup.go index a0a6bcecb..348dc35d5 100644 --- a/cmd/backup.go +++ b/cmd/backup.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package cmd import ( diff --git a/cmd/cmd.go b/cmd/cmd.go index 83355e5dd..d7b8262e3 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package cmd import ( diff --git a/cmd/restore.go b/cmd/restore.go index 9f7c47bdb..6c5f337b9 100644 --- a/cmd/restore.go +++ b/cmd/restore.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package cmd import ( diff --git a/cmd/validate.go b/cmd/validate.go index d358995a3..eba008f32 100644 --- a/cmd/validate.go +++ b/cmd/validate.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package cmd import ( diff --git a/pkg/backup/client.go b/pkg/backup/client.go index 1b5b6b645..aa16d072f 100644 --- a/pkg/backup/client.go +++ b/pkg/backup/client.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package backup import ( @@ -429,7 +431,7 @@ func (bc *Client) BackupRange( }) // Check if there are duplicated files. - rtree.CheckDupFiles(&results) + checkDupFiles(&results) return nil } diff --git a/pkg/backup/client_test.go b/pkg/backup/client_test.go index ddff45299..bf2700cd4 100644 --- a/pkg/backup/client_test.go +++ b/pkg/backup/client_test.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package backup import ( diff --git a/pkg/backup/metrics.go b/pkg/backup/metrics.go index fb982cc24..67d5fe1e5 100644 --- a/pkg/backup/metrics.go +++ b/pkg/backup/metrics.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package backup import ( diff --git a/pkg/backup/push.go b/pkg/backup/push.go index 803a8ec92..4aaffa7e2 100644 --- a/pkg/backup/push.go +++ b/pkg/backup/push.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package backup import ( diff --git a/pkg/backup/safe_point.go b/pkg/backup/safe_point.go index bb73bc7d9..aa2e812b2 100644 --- a/pkg/backup/safe_point.go +++ b/pkg/backup/safe_point.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package backup import ( diff --git a/pkg/backup/safe_point_test.go b/pkg/backup/safe_point_test.go index 5a4939191..16f40db26 100644 --- a/pkg/backup/safe_point_test.go +++ b/pkg/backup/safe_point_test.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package backup import ( diff --git a/pkg/backup/schema.go b/pkg/backup/schema.go index 66e4beec7..18583d094 100644 --- a/pkg/backup/schema.go +++ b/pkg/backup/schema.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package backup import ( diff --git a/pkg/backup/schema_test.go b/pkg/backup/schema_test.go index a1514ba4a..3b3bef897 100644 --- a/pkg/backup/schema_test.go +++ b/pkg/backup/schema_test.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package backup import ( diff --git a/pkg/checksum/executor.go b/pkg/checksum/executor.go index 30e8f11c8..fac944fa0 100644 --- a/pkg/checksum/executor.go +++ b/pkg/checksum/executor.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package checksum import ( diff --git a/pkg/checksum/executor_test.go b/pkg/checksum/executor_test.go index e9db6267b..43c90761d 100644 --- a/pkg/checksum/executor_test.go +++ b/pkg/checksum/executor_test.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package checksum import ( diff --git a/pkg/conn/conn.go b/pkg/conn/conn.go index 2ab0a0232..c32546796 100644 --- a/pkg/conn/conn.go +++ b/pkg/conn/conn.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package conn import ( diff --git a/pkg/conn/conn_test.go b/pkg/conn/conn_test.go index 90516ae92..c120697dd 100644 --- a/pkg/conn/conn_test.go +++ b/pkg/conn/conn_test.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package conn import ( diff --git a/pkg/glue/glue.go b/pkg/glue/glue.go index b680370aa..a0cd74e64 100644 --- a/pkg/glue/glue.go +++ b/pkg/glue/glue.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package glue import ( diff --git a/pkg/gluetidb/glue.go b/pkg/gluetidb/glue.go index 27ae01c37..94efb1e0c 100644 --- a/pkg/gluetidb/glue.go +++ b/pkg/gluetidb/glue.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package gluetidb import ( diff --git a/pkg/mock/mock_cluster.go b/pkg/mock/mock_cluster.go index aee9666ed..6779b5bc6 100644 --- a/pkg/mock/mock_cluster.go +++ b/pkg/mock/mock_cluster.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package mock import ( diff --git a/pkg/mock/mock_cluster_test.go b/pkg/mock/mock_cluster_test.go index e7ffc6e85..1db0f5a8c 100644 --- a/pkg/mock/mock_cluster_test.go +++ b/pkg/mock/mock_cluster_test.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package mock import ( diff --git a/pkg/restore/backoff.go b/pkg/restore/backoff.go index 44a493138..ae5cddd66 100644 --- a/pkg/restore/backoff.go +++ b/pkg/restore/backoff.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package restore import ( diff --git a/pkg/restore/backoff_test.go b/pkg/restore/backoff_test.go index 73161a9f6..11accedd2 100644 --- a/pkg/restore/backoff_test.go +++ b/pkg/restore/backoff_test.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package restore import ( diff --git a/pkg/restore/client.go b/pkg/restore/client.go index 46cdcaa24..38cf2d5a6 100644 --- a/pkg/restore/client.go +++ b/pkg/restore/client.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package restore import ( diff --git a/pkg/restore/client_test.go b/pkg/restore/client_test.go index b67bbcfd7..3f8cb71f8 100644 --- a/pkg/restore/client_test.go +++ b/pkg/restore/client_test.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package restore import ( diff --git a/pkg/restore/db.go b/pkg/restore/db.go index 22a1a4794..7251b9f24 100644 --- a/pkg/restore/db.go +++ b/pkg/restore/db.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package restore import ( diff --git a/pkg/restore/db_test.go b/pkg/restore/db_test.go index b1e9e947c..3f77a53dd 100644 --- a/pkg/restore/db_test.go +++ b/pkg/restore/db_test.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package restore import ( diff --git a/pkg/restore/import.go b/pkg/restore/import.go index b8928418d..fb537584f 100644 --- a/pkg/restore/import.go +++ b/pkg/restore/import.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package restore import ( diff --git a/pkg/restore/range.go b/pkg/restore/range.go index 97e2469dc..0d5192ca9 100644 --- a/pkg/restore/range.go +++ b/pkg/restore/range.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package restore import ( diff --git a/pkg/restore/range_test.go b/pkg/restore/range_test.go index 371e79ebb..37561f6b4 100644 --- a/pkg/restore/range_test.go +++ b/pkg/restore/range_test.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package restore import ( diff --git a/pkg/restore/split.go b/pkg/restore/split.go index 4642ab853..dc0bab80a 100644 --- a/pkg/restore/split.go +++ b/pkg/restore/split.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package restore import ( diff --git a/pkg/restore/split_client.go b/pkg/restore/split_client.go index 9ab3ed7f1..14cde92a3 100644 --- a/pkg/restore/split_client.go +++ b/pkg/restore/split_client.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package restore import ( diff --git a/pkg/restore/split_test.go b/pkg/restore/split_test.go index 61896b114..75b27f378 100644 --- a/pkg/restore/split_test.go +++ b/pkg/restore/split_test.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package restore import ( diff --git a/pkg/restore/util.go b/pkg/restore/util.go index eb59e625f..72fd398ea 100644 --- a/pkg/restore/util.go +++ b/pkg/restore/util.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package restore import ( diff --git a/pkg/restore/util_test.go b/pkg/restore/util_test.go index 1b5e86b96..d1a738fdb 100644 --- a/pkg/restore/util_test.go +++ b/pkg/restore/util_test.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package restore import ( diff --git a/pkg/rtree/rtree.go b/pkg/rtree/rtree.go index e3c136803..08b757af5 100644 --- a/pkg/rtree/rtree.go +++ b/pkg/rtree/rtree.go @@ -1,15 +1,4 @@ -// Copyright 2020 PingCAP, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. package rtree diff --git a/pkg/rtree/rtree_test.go b/pkg/rtree/rtree_test.go index f4ec4f201..d3e151e25 100644 --- a/pkg/rtree/rtree_test.go +++ b/pkg/rtree/rtree_test.go @@ -1,15 +1,4 @@ -// Copyright 2020 PingCAP, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. package rtree diff --git a/pkg/storage/flags.go b/pkg/storage/flags.go index 2340467ba..c828f57a1 100644 --- a/pkg/storage/flags.go +++ b/pkg/storage/flags.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package storage import ( diff --git a/pkg/storage/gcs.go b/pkg/storage/gcs.go index 2eb310c3a..7e105929f 100644 --- a/pkg/storage/gcs.go +++ b/pkg/storage/gcs.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package storage import ( diff --git a/pkg/storage/gcs_test.go b/pkg/storage/gcs_test.go index 10bb44371..60a26f616 100644 --- a/pkg/storage/gcs_test.go +++ b/pkg/storage/gcs_test.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package storage import ( diff --git a/pkg/storage/local.go b/pkg/storage/local.go index 77ca7f6a4..d2555a978 100644 --- a/pkg/storage/local.go +++ b/pkg/storage/local.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package storage import ( diff --git a/pkg/storage/local_unix.go b/pkg/storage/local_unix.go index be0050e83..aedf7c637 100644 --- a/pkg/storage/local_unix.go +++ b/pkg/storage/local_unix.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + // +build !windows package storage diff --git a/pkg/storage/local_windows.go b/pkg/storage/local_windows.go index a3ab2b784..cb784fad4 100644 --- a/pkg/storage/local_windows.go +++ b/pkg/storage/local_windows.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + // +build windows package storage diff --git a/pkg/storage/noop.go b/pkg/storage/noop.go index 17b1dea55..1ee698342 100644 --- a/pkg/storage/noop.go +++ b/pkg/storage/noop.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package storage import "context" diff --git a/pkg/storage/parse.go b/pkg/storage/parse.go index c470d5458..d75e7663d 100644 --- a/pkg/storage/parse.go +++ b/pkg/storage/parse.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package storage import ( diff --git a/pkg/storage/parse_test.go b/pkg/storage/parse_test.go index d72b8a5b3..a4cdbc394 100644 --- a/pkg/storage/parse_test.go +++ b/pkg/storage/parse_test.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package storage import ( diff --git a/pkg/storage/s3.go b/pkg/storage/s3.go index 8e04769b5..4758cad6d 100644 --- a/pkg/storage/s3.go +++ b/pkg/storage/s3.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package storage import ( diff --git a/pkg/storage/s3_test.go b/pkg/storage/s3_test.go index 3eaf1c206..581ad24e4 100644 --- a/pkg/storage/s3_test.go +++ b/pkg/storage/s3_test.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package storage import ( diff --git a/pkg/storage/storage.go b/pkg/storage/storage.go index f9ae368ae..91143ca54 100644 --- a/pkg/storage/storage.go +++ b/pkg/storage/storage.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package storage import ( diff --git a/pkg/summary/collector.go b/pkg/summary/collector.go index 0fb1dfcf9..42488cb82 100644 --- a/pkg/summary/collector.go +++ b/pkg/summary/collector.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package summary import ( diff --git a/pkg/summary/collector_test.go b/pkg/summary/collector_test.go index 6a8704db2..7dff32dd1 100644 --- a/pkg/summary/collector_test.go +++ b/pkg/summary/collector_test.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package summary import ( diff --git a/pkg/summary/summary.go b/pkg/summary/summary.go index 88d3fb143..08a16c00a 100644 --- a/pkg/summary/summary.go +++ b/pkg/summary/summary.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package summary import "time" diff --git a/pkg/task/backup.go b/pkg/task/backup.go index 4a2b6da12..b4ece838d 100644 --- a/pkg/task/backup.go +++ b/pkg/task/backup.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package task import ( diff --git a/pkg/task/backup_raw.go b/pkg/task/backup_raw.go index 721902afb..aa980b1a0 100644 --- a/pkg/task/backup_raw.go +++ b/pkg/task/backup_raw.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package task import ( diff --git a/pkg/task/common.go b/pkg/task/common.go index 1e03177cb..57134c60a 100644 --- a/pkg/task/common.go +++ b/pkg/task/common.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package task import ( diff --git a/pkg/task/restore.go b/pkg/task/restore.go index f5020403a..f8333d7ff 100644 --- a/pkg/task/restore.go +++ b/pkg/task/restore.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package task import ( diff --git a/pkg/utils/key.go b/pkg/utils/key.go index 8ed1109b0..ecaa5fce2 100644 --- a/pkg/utils/key.go +++ b/pkg/utils/key.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package utils import ( diff --git a/pkg/utils/key_test.go b/pkg/utils/key_test.go index 092962135..e314fbeb5 100644 --- a/pkg/utils/key_test.go +++ b/pkg/utils/key_test.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package utils import ( diff --git a/pkg/utils/progress.go b/pkg/utils/progress.go index 8c66093f0..3ed147f0a 100644 --- a/pkg/utils/progress.go +++ b/pkg/utils/progress.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package utils import ( diff --git a/pkg/utils/progress_test.go b/pkg/utils/progress_test.go index 7c1d9c947..0d76abd8f 100644 --- a/pkg/utils/progress_test.go +++ b/pkg/utils/progress_test.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package utils import ( diff --git a/pkg/utils/retry.go b/pkg/utils/retry.go index a8f446764..1dbbcdad2 100644 --- a/pkg/utils/retry.go +++ b/pkg/utils/retry.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package utils import ( diff --git a/pkg/utils/schema.go b/pkg/utils/schema.go index e1aec1225..bc22768e5 100644 --- a/pkg/utils/schema.go +++ b/pkg/utils/schema.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package utils import ( diff --git a/pkg/utils/schema_test.go b/pkg/utils/schema_test.go index 336b6d4f8..22456be83 100644 --- a/pkg/utils/schema_test.go +++ b/pkg/utils/schema_test.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package utils import ( diff --git a/pkg/utils/tso.go b/pkg/utils/tso.go index 6f9ca1aa4..c90cd3575 100644 --- a/pkg/utils/tso.go +++ b/pkg/utils/tso.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package utils import ( diff --git a/pkg/utils/unit.go b/pkg/utils/unit.go index a12dcb6c2..253d97eb6 100644 --- a/pkg/utils/unit.go +++ b/pkg/utils/unit.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package utils // unit of storage diff --git a/pkg/utils/unit_test.go b/pkg/utils/unit_test.go index 5b3c00530..6cf89e316 100644 --- a/pkg/utils/unit_test.go +++ b/pkg/utils/unit_test.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package utils import ( diff --git a/pkg/utils/utils_test.go b/pkg/utils/utils_test.go index f82e28c69..ff8affa7c 100644 --- a/pkg/utils/utils_test.go +++ b/pkg/utils/utils_test.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package utils import ( diff --git a/pkg/utils/version.go b/pkg/utils/version.go index 13a3c7a92..e3d46e301 100644 --- a/pkg/utils/version.go +++ b/pkg/utils/version.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package utils import ( diff --git a/pkg/utils/worker.go b/pkg/utils/worker.go index a77bae090..2d800ddcd 100644 --- a/pkg/utils/worker.go +++ b/pkg/utils/worker.go @@ -1,3 +1,5 @@ +// Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. + package utils import ( From 2dbd6a76d5b0b1fb4d99ed1edec9547449064552 Mon Sep 17 00:00:00 2001 From: Neil Shen Date: Fri, 6 Mar 2020 17:23:05 +0800 Subject: [PATCH 3/3] Update LICENSE.md Co-Authored-By: kennytm --- LICENSE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index 91ed1b93f..4eedc0116 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -186,7 +186,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright PingCAP, Inc. + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -198,4 +198,4 @@ Apache License distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file + limitations under the License.