@@ -223,10 +223,13 @@ func (t *timestampOracle) syncTimestamp() error {
223223 t .metrics .syncSaveDuration .Observe (time .Since (start ).Seconds ())
224224
225225 t .metrics .syncOKEvent .Inc ()
226+ // "last" is the etcd value, "last-saved" is the in-memory window, "save" is the
227+ // newly persisted window, and "next" is the physical time loaded into memory
226228 log .Info ("sync and save timestamp" ,
227229 logutil .CondUint32 ("keyspace-group-id" , t .keyspaceGroupID , t .keyspaceGroupID > 0 ),
228230 zap .Time ("last" , last ), zap .Time ("last-saved" , lastSavedTime ),
229- zap .Time ("save" , save ), zap .Time ("next" , next ))
231+ zap .Time ("save" , save ), zap .Time ("next" , next ),
232+ zap .String ("member-name" , t .member .Name ()))
230233 // save into memory
231234 t .setTSOPhysical (next )
232235 return nil
@@ -292,6 +295,11 @@ func (t *timestampOracle) resetUserTimestamp(tso uint64, ignoreSmaller, skipUppe
292295 }
293296 t .lastSavedTime .Store (save )
294297 t .metrics .resetSaveDuration .Observe (time .Since (start ).Seconds ())
298+ log .Info ("persisted tso window to etcd (user-reset)" ,
299+ logutil .CondUint32 ("keyspace-group-id" , t .keyspaceGroupID , t .keyspaceGroupID > 0 ),
300+ zap .Time ("save" , save ), zap .Time ("next" , nextPhysical ),
301+ zap .String ("member-name" , t .member .Name ()),
302+ )
295303 }
296304 // save into memory only if nextPhysical or nextLogical is greater.
297305 t .tsoMux .physical = nextPhysical
@@ -399,6 +407,11 @@ func (t *timestampOracle) updateTimestamp(purpose updatePurpose) (bool, error) {
399407 }
400408 t .lastSavedTime .Store (save )
401409 t .metrics .updateSaveDuration .Observe (time .Since (start ).Seconds ())
410+ log .Debug ("persisted tso window to etcd (update)" ,
411+ logutil .CondUint32 ("keyspace-group-id" , t .keyspaceGroupID , t .keyspaceGroupID > 0 ),
412+ zap .Time ("save" , save ), zap .Time ("next" , next ),
413+ zap .String ("member-name" , t .member .Name ()),
414+ )
402415 }
403416 // If it's an IntervalUpdate, we don't need to check logical overflow, just update physical time directly.
404417 // Otherwise, the caller met logical overflow, so it will allocate physical time to alloc more timestamp in concurrent.
0 commit comments