@@ -2932,7 +2932,7 @@ func (s *Store) WriteLastUpTimestamp(ctx context.Context, time hlc.Timestamp) er
29322932 ctx = s .AnnotateCtx (ctx )
29332933 return storage .MVCCPutProto (
29342934 ctx ,
2935- s .TODOEngine (), // TODO(sep-raft-log): probably state engine
2935+ s .LogEngine (),
29362936 keys .StoreLastUpKey (),
29372937 hlc.Timestamp {},
29382938 & time ,
@@ -2947,7 +2947,7 @@ func (s *Store) WriteLastUpTimestamp(ctx context.Context, time hlc.Timestamp) er
29472947// timestamp is returned instead.
29482948func (s * Store ) ReadLastUpTimestamp (ctx context.Context ) (hlc.Timestamp , error ) {
29492949 var timestamp hlc.Timestamp
2950- ok , err := storage .MVCCGetProto (ctx , s .TODOEngine (), keys .StoreLastUpKey (), hlc.Timestamp {},
2950+ ok , err := storage .MVCCGetProto (ctx , s .LogEngine (), keys .StoreLastUpKey (), hlc.Timestamp {},
29512951 & timestamp , storage.MVCCGetOptions {})
29522952 if err != nil {
29532953 return hlc.Timestamp {}, err
@@ -2961,8 +2961,8 @@ func (s *Store) ReadLastUpTimestamp(ctx context.Context) (hlc.Timestamp, error)
29612961func (s * Store ) WriteHLCUpperBound (ctx context.Context , time int64 ) error {
29622962 ctx = s .AnnotateCtx (ctx )
29632963 ts := hlc.Timestamp {WallTime : time }
2964- batch := s . TODOEngine (). NewBatch () // TODO(sep-raft-log): state engine might be useful here due to need to sync
2965- // Write has to sync to disk to ensure HLC monotonicity across restarts
2964+ // Write has to sync to disk to ensure HLC monotonicity across restarts.
2965+ batch := s . LogEngine (). NewBatch ()
29662966 defer batch .Close ()
29672967 if err := storage .MVCCPutProto (
29682968 ctx ,
@@ -2974,11 +2974,7 @@ func (s *Store) WriteHLCUpperBound(ctx context.Context, time int64) error {
29742974 ); err != nil {
29752975 return err
29762976 }
2977-
2978- if err := batch .Commit (true /* sync */ ); err != nil {
2979- return err
2980- }
2981- return nil
2977+ return batch .Commit (true /* sync */ )
29822978}
29832979
29842980// ReadHLCUpperBound returns the upper bound to the wall time of the HLC
0 commit comments