[Bug] the method of `log` in Entrance can be lost log info
- Dominant language
- Java
- Stars
- 3.4k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
### Search before asking
- [X] I searched the [issues](https://github.com/apache/incubator-linkis/issues) and found no similar issues.
### Linkis Component
linkis-computation-governance
### Steps to reproduce
If the script is executed for more than 5 minutes, and the log is actively added, the previous log will be lost.
### Expected behavior
Call the `log` method, we can get the log normally
### Your environment
- Linkis version used: 1.1.1
### Anything else
More than 5 minutes, the `cachedLogs` will write to hdfs . And execute `fakeClear` method that it set all element to null, but not reset the Attributes of `flag`, `tail`, `realSize`, so when realLog, it still read log from `cachedLogs`, but it empty.
(默认超过5分钟,增加新日志会执行清除缓存并刷hdfs,但是清除缓存不会重置cachedLogs的`flag`, `tail`, `realSize`,所以当获取日志时,!sharedCache.cachedLogs.nonEmpty 不会为空,也就是不会从hdfs读取,还是从内存读取)


### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
Contributor guide
Assessment
This issue has not been assessed yet.