Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mon: don't panic in prod if no bytes to release
Previously, we'd unconditionally panic the server if a memory monitor was asked to release more bytes than it had allocated. This can happen when there's a bug in memory accounting, but doesn't indicate an actual memory leak. This commit changes the panic to be a ReportOrPanic, which will panic in test environments and send a report to sentry in production environments. The memory monitor then resets itself to 0 allocated bytes. Release note (bug fix): prevent production server crashes on certain assertion errors
- Loading branch information