Skip to content

DM-47970: Make raw deletion more thorough.#315

Open
erinleighh wants to merge 1 commit intomainfrom
tickets/DM-47970
Open

DM-47970: Make raw deletion more thorough.#315
erinleighh wants to merge 1 commit intomainfrom
tickets/DM-47970

Conversation

@erinleighh
Copy link
Copy Markdown
Contributor

No description provided.

@erinleighh erinleighh force-pushed the tickets/DM-47970 branch 5 times, most recently from 4573e07 to 8219f87 Compare June 6, 2025 16:33
@erinleighh erinleighh force-pushed the tickets/DM-47970 branch 2 times, most recently from 652c375 to 460da8c Compare June 9, 2025 22:14
@kfindeisen
Copy link
Copy Markdown
Member

Is this still relevant?

@erinleighh erinleighh force-pushed the tickets/DM-47970 branch 2 times, most recently from 7858532 to e4b3329 Compare February 18, 2026 22:15
Copy link
Copy Markdown
Member

@kfindeisen kfindeisen left a comment

Choose a reason for hiding this comment

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

Please don't double-log exceptions, otherwise looks good.

)
n_raws = len(raws)
if n_raws == 0:
_log_trace.debug("No raws to remove for detector %s.", self.visit.detector)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think the "for detector" bit really makes sense here -- the point is if we accidentally left some old raws because of a logic bug, they'll get cleaned up too.

Comment on lines +1861 to +1863
except Exception:
_log_trace.exception("Raw removal failed for detector %s.", self.visit.detector)
raise
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please do not use log-and-reraise -- exceptions should only be logged once, when they are handled.

If this were a reasonable place to log the exception, it would not make sense to log it at trace level (if something unexpectedly goes wrong, that's at least a warning).

Comment on lines +1851 to +1852
instrument=self.visit.instrument,
detector=self.visit.detector,
Copy link
Copy Markdown
Member

@kfindeisen kfindeisen Feb 19, 2026

Choose a reason for hiding this comment

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

Oops, almost missed this -- please delete all raws unconditionally (maybe with an instrument constraint, but I think the query will resolve just fine without it). That's kind of the point...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants