mirror of
https://github.com/coder/coder.git
synced 2026-06-03 13:08:25 +00:00
71defbc7ff
- Handle nil l.Time by falling back to dbtime.Now() instead of storing year-0001 timestamp. - Wrap matched_rule with NULLIF in InsertBoundaryLogs SQL so empty strings are stored as NULL, preserving IS NULL query semantics. - Make ensureSession check for sql.ErrNoRows specifically; transient DB errors, auth failures, and context cancellation no longer fall through to an unnecessary INSERT attempt. - Add maxBoundaryLogsPerBatch (1000) limit to reject oversized batches that could cause unbounded memory allocation or query timeouts. - Return early on empty req.Logs to avoid unnecessary session creation and DB round-trips.