Commit 51abbeb
committed
Suppress producer error log on shutdown
I noticed when running some benchmarking tonight that I'd occasionally
get an error line at the end even though things seem to finish cleanly:
May 13 18:13:36.622 ERR producer: Error fetching queue settings err="context canceled"
Looking at the implementation, it looks like this is something that
could happen randomly in the poll-only path. If the producer happens to
be polling for queue changes as shutdown happens, it'll log an error as
the context is cancelled. This is more likely to happen for SQLite
because we constrain the connection pool to only one active connection.
Here, only produce an error log conditionally in cases where the parent
context has not been cancelled.1 parent d04b82a commit 51abbeb
2 files changed
Lines changed: 14 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
797 | 797 | | |
798 | 798 | | |
799 | 799 | | |
800 | | - | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
801 | 809 | | |
802 | | - | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
803 | 814 | | |
804 | 815 | | |
805 | 816 | | |
| |||
857 | 868 | | |
858 | 869 | | |
859 | 870 | | |
860 | | - | |
861 | | - | |
862 | | - | |
863 | | - | |
864 | | - | |
865 | | - | |
866 | | - | |
867 | | - | |
868 | | - | |
869 | | - | |
870 | 871 | | |
871 | 872 | | |
872 | 873 | | |
| |||
0 commit comments