-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FLINK-36278] Reduce log size #119
Conversation
273a68a
to
bc5f8b9
Compare
Looking at the current test failures of this PR the log size (https://github.com/apache/flink-connector-kafka/actions/runs/10881066111/job/30189211552?pr=119) is still 50MB+. I wonder if this PR fixes the issue. |
61b0c89
to
6501a1e
Compare
6501a1e
to
25a2828
Compare
Currently, container logs appear under an o.a.f logger and thus are visible on CI. This results in compressed log size >40MB for a run and often leads to download errors. This PR reroutes container logs to a special container logger. It also uses a custom format to significantly reduce the size of each log line. The logs for containers are disabled by default.
We should never use INFO for tracking records on the hotpath. Ideally, we would use trace but for this commit I just decreased to DEBUG to minimize the impact on production settings (is it even possible to leave production on INFO currently?).
25a2828
to
0454a0f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for driving the investigation to an end. Only one minor comment regarding the APi of the KafkaUtil
return LoggerFactory.getLogger("container." + containerName); | ||
} | ||
|
||
public static Logger getLogger(String type, Class<?> testClass) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Afaict this method is always called with "flink"
as a first parameter. WDY about removing the type parameter and always set it to flink
when called with a testClass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. I'll rename to getFlinkLogger then.
# For old school kafka test that spawn the test server in the same JVM | ||
logger.kafka2.name = kafka |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which tests still spawn kafka in the same JVM?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Errr it seems none. Good catch.
We still have test dependencies on kafka server and zookeeper that I can probably remove and with it these log confs.
aebc234
to
0f95d4c
Compare
Reduce the information that Kafka consumer and producer is logging + Kafka server for old school tests.
Keep INFO only for connector related logs. This will avoid all the different JM and TM logs that deal with task life-cycles. Exceptional things still bubble up as warnings.
…ithCancellation Make a copy of AbstractPartitionDiscoverer#getAllTopics before modifying it.
b052d72
to
ffa72b4
Compare
Currently, container logs appear under an o.a.f logger and thus are visible on CI. This results in compressed log size >40MB for a run and often leads to download errors.
This PR reroutes container logs to a special container logger. It also uses a custom format to significantly reduce the size of each log line. The logs for containers are disabled by default.
Here is the original log of an ITCase (308 KB)
old.log
New formatter, same level (199 KB)
with container.log
Disabled container log (113 KB)
no container.log