From 7bc90004e0214840664eb49ee8df5e273c24718c Mon Sep 17 00:00:00 2001 From: KongQun Yang Date: Thu, 21 Jun 2018 17:38:47 -0700 Subject: [PATCH] Add IO Cache circular buffer full warning Under VLOG(1). IO Cache circular buffer full could result in UDP packet loss with UDP inputs. Related to #390 and #411. Change-Id: Ia5636a70827978b5c2f71f6495256d758766632f --- packager/file/io_cache.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packager/file/io_cache.cc b/packager/file/io_cache.cc index 34b3b8382e..b2b1f866b0 100644 --- a/packager/file/io_cache.cc +++ b/packager/file/io_cache.cc @@ -72,6 +72,9 @@ uint64_t IoCache::Write(const void* buffer, uint64_t size) { AutoLock lock(lock_); while (!closed_ && (BytesFreeInternal() == 0)) { AutoUnlock unlock(lock_); + VLOG(1) << "Circular buffer is full, which can happen if data arrives " + "faster than being consumed by packager. Ignore if it is not " + "live packaging. Otherwise, try increasing --io_cache_size."; read_event_.Wait(); } if (closed_)