Skip to content

Commit

Permalink
*: add some log for debug (#499)
Browse files Browse the repository at this point in the history
* *: add some log for debug

* improve log

* fix
  • Loading branch information
lidezhu authored Nov 11, 2024
1 parent 20630c9 commit c97a983
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions logservice/eventstore/event_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,11 @@ func (e *eventStore) RegisterDispatcher(
subscriptionStat.ids[dispatcherID] = true
candidateIDs[dispatcherID] = true
e.dispatcherStates.Unlock()
log.Info("reuse existing subscription",
zap.Any("dispatcherID", dispatcherID),
zap.Uint64("subID", uint64(stat.subID)),
zap.Uint64("checkpointTs", subscriptionStat.checkpointTs),
zap.Uint64("startTs", startTs))
return nil
}
}
Expand Down Expand Up @@ -562,6 +567,11 @@ func (e *eventStore) UpdateDispatcherSendTs(
subscriptionStat.checkpointTs,
newCheckpointTs,
)
log.Debug("update checkpoint ts",
zap.Any("dispatcherID", dispatcherID),
zap.Uint64("subID", uint64(stat.subID)),
zap.Uint64("newCheckpointTs", newCheckpointTs),
zap.Uint64("oldCheckpointTs", subscriptionStat.checkpointTs))
subscriptionStat.checkpointTs = newCheckpointTs
}
}
Expand Down
4 changes: 3 additions & 1 deletion logservice/schemastore/disk_format.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,9 @@ func readPersistedDDLEvent(snap *pebble.Snapshot, version uint64) PersistedDDLEv
}
ddlValue, closer, err := snap.Get(ddlKey)
if err != nil {
log.Fatal("get ddl job failed", zap.Error(err))
log.Fatal("get ddl job failed",
zap.Uint64("version", version),
zap.Error(err))
}
defer closer.Close()
return unmarshalPersistedDDLEvent(ddlValue)
Expand Down

0 comments on commit c97a983

Please sign in to comment.