quickwit
quickwit copied to clipboard
improve ingest lock
- add metric for how long a lock was held
- when a log is held for too long, log which purpose it had
- when waiting for too long, log why we wanted to acquire the lock
- await inside the macro to force awaiting at the right time (currently, we sometime await outside of the macro, meaning we record an instant access to the lock, and then actually proceed to acquire the lock). I'm not a fan of awaiting inside a macro as it's hidden control flow, but i consider it worth the easy-to-miss mistake