question: public static boolean permitCurrentLog ( long maxCount , long logCount , long currentLogTime , long prevLogTime ) { if ( maxCount == 0 ) { return true ; } else if ( currentLogTime == prevLogTime ) { return true ; } return logCount <= maxCount ; }
target:  Test if current log count is fewer than max count limit However, if the current log has the same timestamp with the previous log, we shouldn't stop even if max count limit has been exceeded. The upper layer component will decide if the last batch of logs should be discarded as a whole. This method is used by classes that read one log each time, e.g. LogFileStream, LogStreamMerger