Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: add some log for debug #499

Merged
merged 3 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading