From 348afcb31bc3f0015274e5ef4a66905ef4849842 Mon Sep 17 00:00:00 2001 From: "y_static_y@sina.com" Date: Thu, 28 Mar 2024 10:53:25 +0800 Subject: [PATCH 1/5] code format Signed-off-by: y_static_y@sina.com --- examples/gcworker/go.mod | 2 +- examples/rawkv/go.mod | 2 +- examples/txnkv/1pc_txn/go.mod | 2 +- examples/txnkv/async_commit/go.mod | 2 +- examples/txnkv/delete_range/go.mod | 2 +- examples/txnkv/go.mod | 2 +- examples/txnkv/pessimistic_txn/go.mod | 2 +- examples/txnkv/unsafedestoryrange/go.mod | 2 +- oracle/oracle.go | 2 +- oracle/oracles/local.go | 2 +- oracle/oracles/mock.go | 4 ++-- oracle/oracles/pd.go | 8 ++++---- tikv/kv.go | 12 ++++++------ 13 files changed, 22 insertions(+), 22 deletions(-) diff --git a/examples/gcworker/go.mod b/examples/gcworker/go.mod index 1da7b81d4d..2159df8033 100644 --- a/examples/gcworker/go.mod +++ b/examples/gcworker/go.mod @@ -30,7 +30,7 @@ require ( github.com/prometheus/procfs v0.12.0 // indirect github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect github.com/tiancaiamao/gp v0.0.0-20221230034425-4025bc8a4d4a // indirect - github.com/tikv/pd/client v0.0.0-20240229062430-b207e514ece1 // indirect + github.com/tikv/pd/client v0.0.0-20240320081713-c00c42e77b31 // indirect github.com/twmb/murmur3 v1.1.3 // indirect go.etcd.io/etcd/api/v3 v3.5.10 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.10 // indirect diff --git a/examples/rawkv/go.mod b/examples/rawkv/go.mod index a0ea6f67b6..45a1c4d08f 100644 --- a/examples/rawkv/go.mod +++ b/examples/rawkv/go.mod @@ -30,7 +30,7 @@ require ( github.com/prometheus/procfs v0.12.0 // indirect github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect github.com/tiancaiamao/gp v0.0.0-20221230034425-4025bc8a4d4a // indirect - github.com/tikv/pd/client v0.0.0-20240229062430-b207e514ece1 // indirect + github.com/tikv/pd/client v0.0.0-20240320081713-c00c42e77b31 // indirect github.com/twmb/murmur3 v1.1.3 // indirect go.etcd.io/etcd/api/v3 v3.5.10 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.10 // indirect diff --git a/examples/txnkv/1pc_txn/go.mod b/examples/txnkv/1pc_txn/go.mod index 70825849b9..224ff0bb6d 100644 --- a/examples/txnkv/1pc_txn/go.mod +++ b/examples/txnkv/1pc_txn/go.mod @@ -30,7 +30,7 @@ require ( github.com/prometheus/procfs v0.12.0 // indirect github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect github.com/tiancaiamao/gp v0.0.0-20221230034425-4025bc8a4d4a // indirect - github.com/tikv/pd/client v0.0.0-20240229062430-b207e514ece1 // indirect + github.com/tikv/pd/client v0.0.0-20240320081713-c00c42e77b31 // indirect github.com/twmb/murmur3 v1.1.3 // indirect go.etcd.io/etcd/api/v3 v3.5.10 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.10 // indirect diff --git a/examples/txnkv/async_commit/go.mod b/examples/txnkv/async_commit/go.mod index 046d68df60..1253bbde79 100644 --- a/examples/txnkv/async_commit/go.mod +++ b/examples/txnkv/async_commit/go.mod @@ -30,7 +30,7 @@ require ( github.com/prometheus/procfs v0.12.0 // indirect github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect github.com/tiancaiamao/gp v0.0.0-20221230034425-4025bc8a4d4a // indirect - github.com/tikv/pd/client v0.0.0-20240229062430-b207e514ece1 // indirect + github.com/tikv/pd/client v0.0.0-20240320081713-c00c42e77b31 // indirect github.com/twmb/murmur3 v1.1.3 // indirect go.etcd.io/etcd/api/v3 v3.5.10 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.10 // indirect diff --git a/examples/txnkv/delete_range/go.mod b/examples/txnkv/delete_range/go.mod index 704dd51dae..504dd55adf 100644 --- a/examples/txnkv/delete_range/go.mod +++ b/examples/txnkv/delete_range/go.mod @@ -30,7 +30,7 @@ require ( github.com/prometheus/procfs v0.12.0 // indirect github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect github.com/tiancaiamao/gp v0.0.0-20221230034425-4025bc8a4d4a // indirect - github.com/tikv/pd/client v0.0.0-20240229062430-b207e514ece1 // indirect + github.com/tikv/pd/client v0.0.0-20240320081713-c00c42e77b31 // indirect github.com/twmb/murmur3 v1.1.3 // indirect go.etcd.io/etcd/api/v3 v3.5.10 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.10 // indirect diff --git a/examples/txnkv/go.mod b/examples/txnkv/go.mod index bb1508e216..59cb804d77 100644 --- a/examples/txnkv/go.mod +++ b/examples/txnkv/go.mod @@ -30,7 +30,7 @@ require ( github.com/prometheus/procfs v0.12.0 // indirect github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect github.com/tiancaiamao/gp v0.0.0-20221230034425-4025bc8a4d4a // indirect - github.com/tikv/pd/client v0.0.0-20240229062430-b207e514ece1 // indirect + github.com/tikv/pd/client v0.0.0-20240320081713-c00c42e77b31 // indirect github.com/twmb/murmur3 v1.1.3 // indirect go.etcd.io/etcd/api/v3 v3.5.10 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.10 // indirect diff --git a/examples/txnkv/pessimistic_txn/go.mod b/examples/txnkv/pessimistic_txn/go.mod index 491287ca24..4059cefa2b 100644 --- a/examples/txnkv/pessimistic_txn/go.mod +++ b/examples/txnkv/pessimistic_txn/go.mod @@ -30,7 +30,7 @@ require ( github.com/prometheus/procfs v0.12.0 // indirect github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect github.com/tiancaiamao/gp v0.0.0-20221230034425-4025bc8a4d4a // indirect - github.com/tikv/pd/client v0.0.0-20240229062430-b207e514ece1 // indirect + github.com/tikv/pd/client v0.0.0-20240320081713-c00c42e77b31 // indirect github.com/twmb/murmur3 v1.1.3 // indirect go.etcd.io/etcd/api/v3 v3.5.10 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.10 // indirect diff --git a/examples/txnkv/unsafedestoryrange/go.mod b/examples/txnkv/unsafedestoryrange/go.mod index 39450ee27e..202531c6df 100644 --- a/examples/txnkv/unsafedestoryrange/go.mod +++ b/examples/txnkv/unsafedestoryrange/go.mod @@ -30,7 +30,7 @@ require ( github.com/prometheus/procfs v0.12.0 // indirect github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect github.com/tiancaiamao/gp v0.0.0-20221230034425-4025bc8a4d4a // indirect - github.com/tikv/pd/client v0.0.0-20240229062430-b207e514ece1 // indirect + github.com/tikv/pd/client v0.0.0-20240320081713-c00c42e77b31 // indirect github.com/twmb/murmur3 v1.1.3 // indirect go.etcd.io/etcd/api/v3 v3.5.10 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.10 // indirect diff --git a/oracle/oracle.go b/oracle/oracle.go index a72cff7c4a..b5e974c9b9 100644 --- a/oracle/oracle.go +++ b/oracle/oracle.go @@ -59,7 +59,7 @@ type Oracle interface { GetExternalTimestamp(ctx context.Context) (uint64, error) SetExternalTimestamp(ctx context.Context, ts uint64) error - GetMinTimestamp(ctx context.Context) (uint64, error) + GetMinTimestampInAllTSOGroup(ctx context.Context) (uint64, error) } // Future is a future which promises to return a timestamp. diff --git a/oracle/oracles/local.go b/oracle/oracles/local.go index 018047de01..af5f1e1a8a 100644 --- a/oracle/oracles/local.go +++ b/oracle/oracles/local.go @@ -86,7 +86,7 @@ func (l *localOracle) GetTimestamp(ctx context.Context, _ *oracle.Option) (uint6 return ts, nil } -func (l *localOracle) GetMinTimestamp(ctx context.Context) (uint64, error) { +func (l *localOracle) GetMinTimestampInAllTSOGroup(ctx context.Context) (uint64, error) { l.Lock() defer l.Unlock() now := time.Now() diff --git a/oracle/oracles/mock.go b/oracle/oracles/mock.go index 6e23bd0f47..5de3caf178 100644 --- a/oracle/oracles/mock.go +++ b/oracle/oracles/mock.go @@ -93,8 +93,8 @@ func (o *MockOracle) GetTimestamp(ctx context.Context, _ *oracle.Option) (uint64 return ts, nil } -// GetMinTimestamp implements oracle.Oracle interface. -func (o *MockOracle) GetMinTimestamp(ctx context.Context) (uint64, error) { +// GetMinTimestampInAllTSOGroup implements oracle.Oracle interface. +func (o *MockOracle) GetMinTimestampInAllTSOGroup(ctx context.Context) (uint64, error) { o.RLock() defer o.RUnlock() diff --git a/oracle/oracles/pd.go b/oracle/oracles/pd.go index 01301fd3c7..61d540034f 100644 --- a/oracle/oracles/pd.go +++ b/oracle/oracles/pd.go @@ -115,9 +115,9 @@ func (o *pdOracle) GetTimestamp(ctx context.Context, opt *oracle.Option) (uint64 return ts, nil } -// GetMinTimestamp gets a minimum timestamp for all keyspace groups. -func (o *pdOracle) GetMinTimestamp(ctx context.Context) (uint64, error) { - return o.getMinTimestamp(ctx) +// GetMinTimestampInAllTSOGroup gets a minimum timestamp for all keyspace groups. +func (o *pdOracle) GetMinTimestampInAllTSOGroup(ctx context.Context) (uint64, error) { + return o.getMinTimestampInAllTSOGroup(ctx) } type tsFuture struct { @@ -171,7 +171,7 @@ func (o *pdOracle) getTimestamp(ctx context.Context, txnScope string) (uint64, e return oracle.ComposeTS(physical, logical), nil } -func (o *pdOracle) getMinTimestamp(ctx context.Context) (uint64, error) { +func (o *pdOracle) getMinTimestampInAllTSOGroup(ctx context.Context) (uint64, error) { now := time.Now() physical, logical, err := o.c.GetMinTS(ctx) diff --git a/tikv/kv.go b/tikv/kv.go index 172f6f614e..1e483ffe3e 100644 --- a/tikv/kv.go +++ b/tikv/kv.go @@ -425,10 +425,10 @@ func (s *KVStore) CurrentTimestamp(txnScope string) (uint64, error) { return startTS, nil } -// CurrentMinTimestamp returns current timestamp across all keyspace groups. -func (s *KVStore) CurrentMinTimestamp() (uint64, error) { +// CurrentMinTimestampInAllTSOGroup returns current timestamp across all TSO groups. +func (s *KVStore) CurrentMinTimestampInAllTSOGroup() (uint64, error) { bo := retry.NewBackofferWithVars(context.Background(), transaction.TsoMaxBackoff, nil) - startTS, err := s.getMinTimestampWithRetry(bo) + startTS, err := s.getMinTimestampInAllTSOGroupWithRetry(bo) if err != nil { return 0, err } @@ -469,15 +469,15 @@ func (s *KVStore) getTimestampWithRetry(bo *Backoffer, txnScope string) (uint64, } } -func (s *KVStore) getMinTimestampWithRetry(bo *Backoffer) (uint64, error) { +func (s *KVStore) getMinTimestampInAllTSOGroupWithRetry(bo *Backoffer) (uint64, error) { if span := opentracing.SpanFromContext(bo.GetCtx()); span != nil && span.Tracer() != nil { - span1 := span.Tracer().StartSpan("TiKVStore.getMinTimestampWithRetry", opentracing.ChildOf(span.Context())) + span1 := span.Tracer().StartSpan("TiKVStore.getMinTimestampInAllTSOGroupWithRetry", opentracing.ChildOf(span.Context())) defer span1.Finish() bo.SetCtx(opentracing.ContextWithSpan(bo.GetCtx(), span1)) } for { - minTS, err := s.oracle.GetMinTimestamp(bo.GetCtx()) + minTS, err := s.oracle.GetMinTimestampInAllTSOGroup(bo.GetCtx()) if err == nil { return minTS, nil } From 03446d4cacaffca225f9e2d87e53a7d95c91bb20 Mon Sep 17 00:00:00 2001 From: "y_static_y@sina.com" Date: Fri, 29 Mar 2024 14:33:04 +0800 Subject: [PATCH 2/5] code format Signed-off-by: y_static_y@sina.com --- oracle/oracle.go | 2 +- oracle/oracles/local.go | 2 +- oracle/oracles/mock.go | 2 +- oracle/oracles/pd.go | 2 +- tikv/kv.go | 12 ++++++------ 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/oracle/oracle.go b/oracle/oracle.go index b5e974c9b9..1ffba7f297 100644 --- a/oracle/oracle.go +++ b/oracle/oracle.go @@ -59,7 +59,7 @@ type Oracle interface { GetExternalTimestamp(ctx context.Context) (uint64, error) SetExternalTimestamp(ctx context.Context, ts uint64) error - GetMinTimestampInAllTSOGroup(ctx context.Context) (uint64, error) + GetAllTSOKeyspaceGroupMinTS(ctx context.Context) (uint64, error) } // Future is a future which promises to return a timestamp. diff --git a/oracle/oracles/local.go b/oracle/oracles/local.go index af5f1e1a8a..f8016f468c 100644 --- a/oracle/oracles/local.go +++ b/oracle/oracles/local.go @@ -86,7 +86,7 @@ func (l *localOracle) GetTimestamp(ctx context.Context, _ *oracle.Option) (uint6 return ts, nil } -func (l *localOracle) GetMinTimestampInAllTSOGroup(ctx context.Context) (uint64, error) { +func (l *localOracle) GetAllTSOKeyspaceGroupMinTS(ctx context.Context) (uint64, error) { l.Lock() defer l.Unlock() now := time.Now() diff --git a/oracle/oracles/mock.go b/oracle/oracles/mock.go index 5de3caf178..b3b8b496bd 100644 --- a/oracle/oracles/mock.go +++ b/oracle/oracles/mock.go @@ -94,7 +94,7 @@ func (o *MockOracle) GetTimestamp(ctx context.Context, _ *oracle.Option) (uint64 } // GetMinTimestampInAllTSOGroup implements oracle.Oracle interface. -func (o *MockOracle) GetMinTimestampInAllTSOGroup(ctx context.Context) (uint64, error) { +func (o *MockOracle) GetAllTSOKeyspaceGroupMinTS(ctx context.Context) (uint64, error) { o.RLock() defer o.RUnlock() diff --git a/oracle/oracles/pd.go b/oracle/oracles/pd.go index 61d540034f..e19585d770 100644 --- a/oracle/oracles/pd.go +++ b/oracle/oracles/pd.go @@ -116,7 +116,7 @@ func (o *pdOracle) GetTimestamp(ctx context.Context, opt *oracle.Option) (uint64 } // GetMinTimestampInAllTSOGroup gets a minimum timestamp for all keyspace groups. -func (o *pdOracle) GetMinTimestampInAllTSOGroup(ctx context.Context) (uint64, error) { +func (o *pdOracle) GetAllTSOKeyspaceGroupMinTS(ctx context.Context) (uint64, error) { return o.getMinTimestampInAllTSOGroup(ctx) } diff --git a/tikv/kv.go b/tikv/kv.go index 9189df01a6..e4d83705b1 100644 --- a/tikv/kv.go +++ b/tikv/kv.go @@ -425,10 +425,10 @@ func (s *KVStore) CurrentTimestamp(txnScope string) (uint64, error) { return startTS, nil } -// CurrentMinTimestampInAllTSOGroup returns current timestamp across all TSO groups. -func (s *KVStore) CurrentMinTimestampInAllTSOGroup() (uint64, error) { +// CurrentMinTsInAllTSOKeyspaceGroup returns current timestamp across all TSO keyspace groups. +func (s *KVStore) CurrentMinTsInAllTSOKeyspaceGroup() (uint64, error) { bo := retry.NewBackofferWithVars(context.Background(), transaction.TsoMaxBackoff, nil) - startTS, err := s.getMinTimestampInAllTSOGroupWithRetry(bo) + startTS, err := s.getMinTsInAllTSOKeyspaceGroupWithRetry(bo) if err != nil { return 0, err } @@ -469,15 +469,15 @@ func (s *KVStore) getTimestampWithRetry(bo *Backoffer, txnScope string) (uint64, } } -func (s *KVStore) getMinTimestampInAllTSOGroupWithRetry(bo *Backoffer) (uint64, error) { +func (s *KVStore) getMinTsInAllTSOKeyspaceGroupWithRetry(bo *Backoffer) (uint64, error) { if span := opentracing.SpanFromContext(bo.GetCtx()); span != nil && span.Tracer() != nil { - span1 := span.Tracer().StartSpan("TiKVStore.getMinTimestampInAllTSOGroupWithRetry", opentracing.ChildOf(span.Context())) + span1 := span.Tracer().StartSpan("TiKVStore.getMinTsInAllTSOKeyspaceGroupWithRetry", opentracing.ChildOf(span.Context())) defer span1.Finish() bo.SetCtx(opentracing.ContextWithSpan(bo.GetCtx(), span1)) } for { - minTS, err := s.oracle.GetMinTimestampInAllTSOGroup(bo.GetCtx()) + minTS, err := s.oracle.GetAllTSOKeyspaceGroupMinTS(bo.GetCtx()) if err == nil { return minTS, nil } From f0a875330ba761e7188edca1d50823058e1276fe Mon Sep 17 00:00:00 2001 From: "y_static_y@sina.com" Date: Fri, 29 Mar 2024 14:42:38 +0800 Subject: [PATCH 3/5] code format Signed-off-by: y_static_y@sina.com --- tikv/kv.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tikv/kv.go b/tikv/kv.go index e4d83705b1..2850a2d7c6 100644 --- a/tikv/kv.go +++ b/tikv/kv.go @@ -425,10 +425,10 @@ func (s *KVStore) CurrentTimestamp(txnScope string) (uint64, error) { return startTS, nil } -// CurrentMinTsInAllTSOKeyspaceGroup returns current timestamp across all TSO keyspace groups. -func (s *KVStore) CurrentMinTsInAllTSOKeyspaceGroup() (uint64, error) { +// CurrentAllTSOKeyspaceMinTsGroup returns current timestamp across all TSO keyspace groups. +func (s *KVStore) CurrentAllTSOKeyspaceMinTsGroup() (uint64, error) { bo := retry.NewBackofferWithVars(context.Background(), transaction.TsoMaxBackoff, nil) - startTS, err := s.getMinTsInAllTSOKeyspaceGroupWithRetry(bo) + startTS, err := s.getAllTSOKeyspaceGroupMinTSWithRetry(bo) if err != nil { return 0, err } @@ -469,9 +469,9 @@ func (s *KVStore) getTimestampWithRetry(bo *Backoffer, txnScope string) (uint64, } } -func (s *KVStore) getMinTsInAllTSOKeyspaceGroupWithRetry(bo *Backoffer) (uint64, error) { +func (s *KVStore) getAllTSOKeyspaceGroupMinTSWithRetry(bo *Backoffer) (uint64, error) { if span := opentracing.SpanFromContext(bo.GetCtx()); span != nil && span.Tracer() != nil { - span1 := span.Tracer().StartSpan("TiKVStore.getMinTsInAllTSOKeyspaceGroupWithRetry", opentracing.ChildOf(span.Context())) + span1 := span.Tracer().StartSpan("TiKVStore.getAllTSOKeyspaceGroupMinTSWithRetry", opentracing.ChildOf(span.Context())) defer span1.Finish() bo.SetCtx(opentracing.ContextWithSpan(bo.GetCtx(), span1)) } From 7fb9b5dd171ad8255b9ca5efec439b928eff11c5 Mon Sep 17 00:00:00 2001 From: "y_static_y@sina.com" Date: Fri, 29 Mar 2024 15:01:50 +0800 Subject: [PATCH 4/5] code format Signed-off-by: y_static_y@sina.com --- oracle/oracle.go | 1 + oracle/oracles/pd.go | 2 +- tikv/kv.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/oracle/oracle.go b/oracle/oracle.go index 1ffba7f297..5579d3568a 100644 --- a/oracle/oracle.go +++ b/oracle/oracle.go @@ -59,6 +59,7 @@ type Oracle interface { GetExternalTimestamp(ctx context.Context) (uint64, error) SetExternalTimestamp(ctx context.Context, ts uint64) error + // GetAllTSOKeyspaceGroupMinTS gets a minimum timestamp from all TSO keyspace groups. GetAllTSOKeyspaceGroupMinTS(ctx context.Context) (uint64, error) } diff --git a/oracle/oracles/pd.go b/oracle/oracles/pd.go index e19585d770..fcabbe2ef1 100644 --- a/oracle/oracles/pd.go +++ b/oracle/oracles/pd.go @@ -115,7 +115,7 @@ func (o *pdOracle) GetTimestamp(ctx context.Context, opt *oracle.Option) (uint64 return ts, nil } -// GetMinTimestampInAllTSOGroup gets a minimum timestamp for all keyspace groups. +// GetMinTimestampInAllTSOGroup gets a minimum timestamp for all TSO keyspace groups. func (o *pdOracle) GetAllTSOKeyspaceGroupMinTS(ctx context.Context) (uint64, error) { return o.getMinTimestampInAllTSOGroup(ctx) } diff --git a/tikv/kv.go b/tikv/kv.go index 2850a2d7c6..7d2dec3cfc 100644 --- a/tikv/kv.go +++ b/tikv/kv.go @@ -425,7 +425,7 @@ func (s *KVStore) CurrentTimestamp(txnScope string) (uint64, error) { return startTS, nil } -// CurrentAllTSOKeyspaceMinTsGroup returns current timestamp across all TSO keyspace groups. +// CurrentAllTSOKeyspaceMinTsGroup returns a minimum timestamp from all TSO keyspace groups. func (s *KVStore) CurrentAllTSOKeyspaceMinTsGroup() (uint64, error) { bo := retry.NewBackofferWithVars(context.Background(), transaction.TsoMaxBackoff, nil) startTS, err := s.getAllTSOKeyspaceGroupMinTSWithRetry(bo) From e0f3f3f25590f1479fd6d03adda5166a738c7a56 Mon Sep 17 00:00:00 2001 From: "y_static_y@sina.com" Date: Fri, 29 Mar 2024 15:08:18 +0800 Subject: [PATCH 5/5] code format Signed-off-by: y_static_y@sina.com --- oracle/oracles/mock.go | 2 +- oracle/oracles/pd.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/oracle/oracles/mock.go b/oracle/oracles/mock.go index b3b8b496bd..633d975371 100644 --- a/oracle/oracles/mock.go +++ b/oracle/oracles/mock.go @@ -93,7 +93,7 @@ func (o *MockOracle) GetTimestamp(ctx context.Context, _ *oracle.Option) (uint64 return ts, nil } -// GetMinTimestampInAllTSOGroup implements oracle.Oracle interface. +// GetAllTSOKeyspaceGroupMinTS implements oracle.Oracle interface. func (o *MockOracle) GetAllTSOKeyspaceGroupMinTS(ctx context.Context) (uint64, error) { o.RLock() defer o.RUnlock() diff --git a/oracle/oracles/pd.go b/oracle/oracles/pd.go index fcabbe2ef1..83dd41f3c3 100644 --- a/oracle/oracles/pd.go +++ b/oracle/oracles/pd.go @@ -115,7 +115,7 @@ func (o *pdOracle) GetTimestamp(ctx context.Context, opt *oracle.Option) (uint64 return ts, nil } -// GetMinTimestampInAllTSOGroup gets a minimum timestamp for all TSO keyspace groups. +// GetAllTSOKeyspaceGroupMinTS gets a minimum timestamp from all TSO keyspace groups. func (o *pdOracle) GetAllTSOKeyspaceGroupMinTS(ctx context.Context) (uint64, error) { return o.getMinTimestampInAllTSOGroup(ctx) }