Move concurrent update error logging to debug level.#477
Conversation
There was a problem hiding this comment.
Pull request overview
Concurrent aux-update errors were being logged as errors by the #[instrument(..., err)] attribute, creating noise during normal operation since these are expected and gracefully handled via fallback. This PR downgrades logging for ConcurrentAuxUpdate to debug level while preserving error-level logging for other failures.
Changes:
- Remove
errfrom#[instrument]onupdate_aux_inneracross ZTF, LSST, and DECAM workers. - Explicitly match on the error and log
ConcurrentAuxUpdateat debug level, other errors at error level. - Remove the redundant
warn!inbase.rswhen concurrent modification is detected.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/alert/ztf.rs | Drop err from instrument; log concurrent update at debug, others at error. |
| src/alert/lsst.rs | Same change applied to LSST worker. |
| src/alert/decam.rs | Same change applied to DECAM worker. |
| src/alert/base.rs | Remove redundant warn log at the source of ConcurrentAuxUpdate. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Throughput results (
|
|
@antoine-le-calloch I kind of feel like this warning/error should not show up if all was working properly, meaning instead of just silencing a genuine warning maybe we should:
|
@Theodlz I think you're confusing it with the other |
ohhh my bad, you are right. I did mix up these 2 errors. Let me re-read this PR. |
Yeah I agree but how can I move it to debug without doing this? |
|
Throughput results (
|
we could imagine an approach where the function that's currently raising the error (that really is just a warning) returns some Status enum instead of just Ok() (a little bit like we handle the "alert already exist" stuff, if you ever looked at that). But honestly, I don't think it's worth the extra complexity here. We can stick with what you added! |
No description provided.