Skip to content

Commit

Permalink
[raft] log session (#8047)
Browse files Browse the repository at this point in the history
Add some logging for debugging
  • Loading branch information
luluz66 authored Dec 11, 2024
1 parent a6255c5 commit fc4a127
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions enterprise/server/raft/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,8 @@ func (s *Session) SyncProposeLocal(ctx context.Context, nodehost NodeHost, range
return nil, err
}
var raftResponse dbsm.Result

log.CtxDebugf(ctx, "sync propose local with session %+v", batch.GetSession())
err = RunNodehostFn(ctx, func(ctx context.Context) error {
ctx, spn := tracing.StartSpan(ctx) // nolint:SA4006
spn.SetName("nodehost.SyncPropose")
Expand Down
1 change: 1 addition & 0 deletions enterprise/server/raft/replica/replica.go
Original file line number Diff line number Diff line change
Expand Up @@ -1523,6 +1523,7 @@ func (sm *Replica) singleUpdate(db pebble.IPebbleDB, entry dbsm.Entry) (dbsm.Ent
}
entry.Result = getEntryResult(entry.Cmd, rspBuf)
if reqSession != nil {
sm.log.Debugf("[%s] save session %+v", sm.name(), reqSession)
if err := sm.updateSession(wb, reqSession, rspBuf); err != nil {
return entry, err
}
Expand Down

0 comments on commit fc4a127

Please sign in to comment.