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
This commit is contained in:
KongQun Yang 2018-06-21 17:38:47 -07:00
parent 6b4a75b6ba
commit 7bc90004e0
1 changed files with 3 additions and 0 deletions

View File

@ -72,6 +72,9 @@ uint64_t IoCache::Write(const void* buffer, uint64_t size) {
AutoLock lock(lock_); AutoLock lock(lock_);
while (!closed_ && (BytesFreeInternal() == 0)) { while (!closed_ && (BytesFreeInternal() == 0)) {
AutoUnlock unlock(lock_); 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(); read_event_.Wait();
} }
if (closed_) if (closed_)