Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Don't attempt to send transactions if Dendrite is shutting down #3356

Merged
merged 2 commits into from
Apr 9, 2024

Conversation

S7evinK
Copy link
Contributor

@S7evinK S7evinK commented Apr 8, 2024

This should avoid confusions with logs like:

time="2024-04-08T08:38:45.104235081Z" level=error msg="Failed to set \"scs.ems.host\" as assumed offline" func="github.com/matrix-org/dendrite/federationapi/statistics.(*ServerStatistics).Failure" file="github.com/matrix-org/dendrite/federationapi/statistics/statistics.go:204" error="sqlutil.WithTransaction.Begin: sql: database is closed"
time="2024-04-08T08:38:45.104239201Z" level=error msg="Failed to set \"obermui.de\" as assumed offline" func="github.com/matrix-org/dendrite/federationapi/statistics.(*ServerStatistics).Failure" file="github.com/matrix-org/dendrite/federationapi/statistics/statistics.go:204" error="sqlutil.WithTransaction.Begin: sql: database is closed"

or

time="2024-04-08T08:38:45.105235411Z" level=error msg="Failed to get pending EDUs for \"retro76.net\"" func="github.com/matrix-org/dendrite/federationapi/queue.(*destinationQueue).getPendingFromDatabase" file="github.com/matrix-org/dendritefederationapi/queue/destinationqueue.go:258" error="sqlutil.WithTransaction.Begin: sql: database is closed"

@S7evinK S7evinK requested a review from a team as a code owner April 8, 2024 18:43
Copy link

codecov bot commented Apr 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.40%. Comparing base (8aa088f) to head (43ac98d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3356      +/-   ##
==========================================
+ Coverage   67.36%   67.40%   +0.03%     
==========================================
  Files         521      521              
  Lines       47364    47366       +2     
==========================================
+ Hits        31905    31925      +20     
+ Misses      11450    11439      -11     
+ Partials     4009     4002       -7     
Flag Coverage Δ
unittests 52.74% <100.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@devonh devonh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems sane to me.

@S7evinK S7evinK merged commit 5c0ceec into main Apr 9, 2024
20 checks passed
@S7evinK S7evinK deleted the s7evink/shutdown-logging branch April 9, 2024 05:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants