Add expired tx logging #484
No reviewers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#484
Loading…
Reference in a new issue
No description provided.
Delete branch "dstepanov-yadro/frostfs-node:fix/notary_prep_logger"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Relates #457
There were errors in the logs related to expired transactions. I want to add transaction logging for further investigation.
6f2990a9b0
to1f91a5361c
1f91a5361c
to82e69bdf0f
@ -0,0 +12,4 @@
func (s *txStringer) String() string {
if s == nil {
return "stringer is null"
It means that we'll see in logs zapped message like
Is it really convinient? For example, for message parsing.
I'd like to return just "null" or "nil" in both statements. WDYT?
Is this line even reachable?
fixed
@ -0,0 +17,4 @@
if s.tx == nil {
return "transaction is null"
}
data, err := s.tx.MarshalJSON()
Wow, this could be A LOT OF text, script size can reach 64 KiB. Do we need it?
Fixed logging. Now only heights will be logged, because
.Hash()
may cause panic, there is already unit test for this behaviour.82e69bdf0f
to05c5ed3aa7
@ -370,3 +370,3 @@
case errors.Is(err, ErrMainTXExpired):
l.log.Warn(logs.EventSkipExpiredMainTXNotaryEvent,
zap.String("error", err.Error()),
zap.Error(err),
I believe initial reasons for using
String
were to avoid having stacktrace for not-so-rare warnings.Anyway, seems unrelated to the commit, move?
ok, fixed
@ -308,6 +318,10 @@ func (p Preparator) validateExpiration(fbTX *transaction.Transaction) error {
}
if currBlock >= nvb.Height {
p.logger.Warn(logs.MorphExpiredTransactionReceived,
We log sth here and in the
parseAndHandleNotary
. Why not just usefmt.Errorf
with these heights?fixed
05c5ed3aa7
to3bfba4b1e9