This topic describes how to identify and troubleshoot major compaction timeouts and errors.
Major compaction timeouts
You can set the zone_merge_timeout parameter to specify the timeout period for major compactions. By default, the timeout period is 3 hours.
After a major compaction times out, the status of the major compaction becomes TIMEOUT. You can view the status by querying the __all_zone table. For more information, see View the major compaction progress.
When a major compaction times out, the compaction continues but is tagged with a timeout flag bit. If a major compaction is tagged with a timeout flag bit, the compaction may last from the early morning to the peak hours on a working day, and an excessive amount of data has been modified on the day before the compaction. For example, a large amount of data has been imported.
When a major compaction times out, you do not need to take additional measures, and the major compaction continues. As the administrator, you can view the progress of the major compaction. For more information about how to view the progress of a major compaction, see View the major compaction process.
You can also view the table compression algorithm and learn about the amount of table data that is modified on the last day. If a large amount of data is modified and the modification is rare, you can wait for the compaction to end. For more information about table compression algorithms, see Major compactions overview.
If the amount of modified data often causes major compaction timeouts and you want to speed up major compactions, you can modify major compaction parameters. For example, you can modify a parameter to increase the number of threads used for major compactions. For more information about major compaction parameters, see Modify major compaction settings.
Major compaction errors
If an exception occurs during a major compaction, the status of the compaction becomes ERROR. The major compaction stops if a compaction error occurs. If a compaction error occurs, you need to contact an administrator to fix the error. A major compaction can restart after the error is fixed.
Common compaction errors include a full disk, I/O timeout, disk I/O error, and compaction canceled.