mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-30 11:36:54 +00:00
Currently, error messages for validation errors are produced in several places: * the high-level validator (which is built on the low-level one) * scrub compaction and validation compaction (scrub in validate mode) * scylla-sstable's validate operation We plan to introduce yet another place which would use the low-level validator and hence would have to produce its own error messages. To cut down all this duplication, centralize the production of error messages in the low-level validator, which now returns a `validation_result` object instead of bool from its validate methods. This object can be converted to bool (so its backwards compatible) and also contains an error message if validation failed. In the next patches we will migrate all users of the low level validator (be that direct or indirect) to use the error messages provided in this result object instead of coming up with one themselves.