@@ -171,9 +171,9 @@ func (s *KVStore) Go(f func()) error {
171
171
return s .gP .Run (f )
172
172
}
173
173
174
- // updateTxnSafePointCache updates the cached txn safe point, which is used for safety check of data access
174
+ // UpdateTxnSafePointCache updates the cached txn safe point, which is used for safety check of data access
175
175
// operations to prevent accessing GC-ed inconsistent data.
176
- func (s * KVStore ) updateTxnSafePointCache (txnSafePoint uint64 , now time.Time ) {
176
+ func (s * KVStore ) UpdateTxnSafePointCache (txnSafePoint uint64 , now time.Time ) {
177
177
s .gcStateCacheMu .Lock ()
178
178
defer s .gcStateCacheMu .Unlock ()
179
179
@@ -354,7 +354,7 @@ func NewKVStore(uuid string, pdClient pd.Client, spkv SafePointKV, tikvclient Cl
354
354
if err != nil {
355
355
return nil , errors .WithStack (err )
356
356
}
357
- store .updateTxnSafePointCache (txnSafePoint , time .Now ())
357
+ store .UpdateTxnSafePointCache (txnSafePoint , time .Now ())
358
358
store .clientMu .client = client .NewReqCollapse (client .NewInterceptedClient (tikvclient ))
359
359
store .clientMu .client .SetEventListener (regionCache .GetClientEventListener ())
360
360
@@ -418,7 +418,7 @@ func (s *KVStore) runTxnSafePointUpdater() {
418
418
case now := <- time .After (d ):
419
419
txnSafePoint , err := s .loadTxnSafePoint (context .Background ())
420
420
if err == nil {
421
- s .updateTxnSafePointCache (txnSafePoint , now )
421
+ s .UpdateTxnSafePointCache (txnSafePoint , now )
422
422
d = pollTxnSafePointInterval
423
423
} else {
424
424
d = pollTxnSafePointQuickRepeatInterval
0 commit comments