Summary:
Added support to the log rollover mechanism with the below support
- If the log size exceeds a certain threshold, the log would be rolled over.
- If the log rotation interval is specified, then the log would be rolled over at the specified interval.
- If neither the log max size nor the log retention period is specified, the logs get rolled over at the beginning of a new day at 12 AM.
- Added the connection manager pid as the suffix to the file. Example log file format name is ysql-conn-mgr-2024-12-04_042819.log.509355 where 509355 is the pid.
- Support to specify the log max size and the log retention period as gflags. The default behavior is to rollover the logs at the beginning of a new day.
- Enabled async logging on connection manager and the logs are serialized based on the upstream odyssey changes.
`ysql_conn_mgr_log_max_size` - Specify the max log size in bytes supported as a tserver gflag.
`ysql_conn_mgr_log_rotate_interval` - Specify the log retention interval in seconds. If the interval is not specified, the log rollover happens at the beginning of each dat at 12 AM.
Original commit: 7185452143e3ef6cd26f4f223d54e3deff14b790 / D39483
There were no merging conflicts when the backport PR was raised.
Test Plan: Jenkins: enable connection manager, all tests
Reviewers: rbarigidad, devansh.saxena, skumar
Reviewed By: rbarigidad
Subscribers: yql, mkumar
Differential Revision: https://phorge.dev.yugabyte.com/D40578