mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 14:10:49 -05:00
* feat(rds): DescribeDBLogFiles and DownloadDBLogFilePortion Both answered UnsupportedOperation, so an instance's log could only be read with docker logs, outside the AWS API. An instance's log is now read from its database container and cut into files the way RDS names them: hourly error/postgresql.log.* files for PostgreSQL, error/mysql-error.log for MySQL and MariaDB, and log/ERROR for SQL Server. DescribeDBLogFiles filters and pages them, and DownloadDBLogFilePortion follows the API reference's marker rules with a 1 MB block cap. Control characters XML cannot carry come back as U+FFFD. In mock RDS mode an instance has no log files. Closes #5733 * fix(rds): bound and validate log file reads A log read now takes the most recent 100,000 lines instead of the whole history, fails when Docker does not finish in time instead of returning part of the log, and, when Docker no longer knows the container, finds or starts the backend once before answering DBInstanceNotReady rather than an empty log. A single line over 1 MB is cut at 1 MB like the rest of the block. Negative FileSize, FileLastWritten and Marker values are InvalidParameterValue; the shared offset paging refuses a negative marker instead of starting over. * fix(rds): close the Docker log stream when a log read times out A timed-out read now closes its callback before failing, so the stream stops and nothing writes into the buffer after the read gives up; the buffer is also written and read under one lock. * refactor(rds): keep portion's Javadoc on portion truncateUtf8 had landed between portion's comment and portion itself. It now follows portion. * test(rds): read log files on the first call, and import class names CreateDBInstance returns once the database accepts connections, so the startup log is already in the container's output. The Docker and SDK log tests now assert on the first DescribeDBLogFiles and DownloadDBLogFilePortion call instead of polling. The timeout test and RdsLogFilesTest import the classes they had written out in full.