mirror of
https://github.com/status-im/consul.git
synced 2025-02-02 17:03:31 +00:00
consul: Log why invalidation happened. Fixes #390
This commit is contained in:
parent
d3c3d9a1be
commit
93b209db50
@ -1421,6 +1421,8 @@ func (s *StateStore) SessionDestroy(index uint64, id string) error {
|
||||
}
|
||||
defer tx.Abort()
|
||||
|
||||
log.Printf("[DEBUG] consul.state: Invalidating session %s due to session destroy",
|
||||
id)
|
||||
if err := s.invalidateSession(index, tx, id); err != nil {
|
||||
return err
|
||||
}
|
||||
@ -1436,6 +1438,8 @@ func (s *StateStore) invalidateNode(index uint64, tx *MDBTxn, node string) error
|
||||
}
|
||||
for _, sess := range sessions {
|
||||
session := sess.(*structs.Session).ID
|
||||
log.Printf("[DEBUG] consul.state: Invalidating session %s due to node '%s' invalidation",
|
||||
session, node)
|
||||
if err := s.invalidateSession(index, tx, session); err != nil {
|
||||
return err
|
||||
}
|
||||
@ -1452,6 +1456,8 @@ func (s *StateStore) invalidateCheck(index uint64, tx *MDBTxn, node, check strin
|
||||
}
|
||||
for _, sc := range sessionChecks {
|
||||
session := sc.(*sessionCheck).Session
|
||||
log.Printf("[DEBUG] consul.state: Invalidating session %s due to check '%s' invalidation",
|
||||
session, check)
|
||||
if err := s.invalidateSession(index, tx, session); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user