CHECK BLOB CHECKSUM
On this page
The CHECK BLOB CHECKSUM command checks for and displays columnstore blob file corruptions.
Syntax
CHECK BLOB CHECKSUM [ON <database_name>][WITH REPAIR[FORCE]];Arguments
-
ON <database_: restricts the check and repair to the blob files of the specified database.name> If omitted then all databases on all nodes are checked.
-
When High Availability (HA) is enabled, the
WITH REPAIRoption will repair the corruption by replacing the corrupt blob with a valid copy (HA replica) from another partition.When HA is not enabled, the corruption cannot be repaired. -
The
WITH REPAIR FORCEoption deletes the metadata for the corrupt blob.While this will allow the table to be queried, it will also result in data loss.
Remarks
-
This command requires the
SUPERprivilege. -
WITH REPAIRtakes a cluster level lock in the exclusive mode and will queue behind other cluster operations, so it should be planned for a maintenance window.CHECK BLOB CHECKSUMwithoutWITH REPAIRis read-only and does not take that lock. -
WITH REPAIR FORCEalso deletes the blob when a copy exists on another node but that copy is itself invalid.Confirm from the Repair operations column of a CHECK BLOB CHECKSUMrun that a valid copy exists before usingFORCE. -
When you see
error 2517,ER_means a columnstore blob file failed to decode on the reporting node.CORRUPT_ BLOB This normally indicates a problem with the storage on that host rather than an engine defect, and the host's kernel logs should be checked alongside running this command.
Example
This is a simple use showing how the output of CHECK BLOB CHECKSUM displays corruption in columnstore blob files.
CHECK BLOB CHECKSUM;
+---------+-----------+-------+----------+-------+---------------------+----------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
| node_id | Host | Port | Database | Table | Filename | Reason | Repair operations |
+---------+-----------+-------+----------+-------+---------------------+----------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
| 2 | 127.0.0.1 | 10001 | db3 | rtab | blobs/22/0/0/10_29 | File has incorrect checksum. Actual checksum 0x29072b55, expected checksum 0xe6ac67b6. | copy blob file from replica on '127.0.0.1':10000 |
| 2 | 127.0.0.1 | 10001 | db3 | rtab | blobs/22/0/0/10_58 | Missing file | copy blob file from replica on '127.0.0.1':10000 |
| 2 | 127.0.0.1 | 10001 | db3 | rtab | blobs/22/0/0/10_88 | File has incorrect size. Actual size 49, expected size 44 | Remove file (a copy of the file is avaliable on 127.0.0.1:10000, but its not valid. Hit error 1017) |
| 2 | 127.0.0.1 | 10001 | db3 | rtab | blobs/22/0/0/10_112 | File has incorrect size. Actual size 51, expected size 46 | copy blob file from replica on '127.0.0.1':10000 |
| 2 | 127.0.0.1 | 10001 | db3 | rtab | blobs/22/0/0/10_118 | File has incorrect size. Actual size 49, expected size 44 | copy blob file from replica on '127.0.0.1':10000 |
| 2 | 127.0.0.1 | 10001 | db3 | rtab | blobs/22/0/0/10_191 | Missing file | copy blob file from replica on '127.0.0.1':10000 |
| 2 | 127.0.0.1 | 10001 | db3 | rtab | blobs/22/0/0/10_203 | File has incorrect checksum. Actual checksum 0xf6aac90f, expected checksum 0x390185ec. | copy blob file from replica on '127.0.0.1':10000 |
| 2 | 127.0.0.1 | 10001 | db3 | rtab | blobs/22/0/0/10_208 | Missing file | copy blob file from replica on '127.0.0.1':10000 |
| 2 | 127.0.0.1 | 10001 | db3 | rtab | blobs/22/0/0/10_214 | File has incorrect checksum. Actual checksum 0x205df634, expected checksum 0xdb081c6a. | copy blob file from replica on '127.0.0.1':10000 |
| 2 | 127.0.0.1 | 10001 | db3 | rtab | blobs/22/0/0/10_232 | File has incorrect checksum. Actual checksum 0x460d1e1a, expected checksum 0xbbab2e04. | Remove file (a copy of the file is avaliable on 127.0.0.1:10000, but its not valid. Hit error 1017) |
| 2 | 127.0.0.1 | 10001 | db3 | rtab | blobs/22/0/0/10_238 | File has incorrect checksum. Actual checksum 0x31705cf0, expected checksum 0xca25b6ae. | copy blob file from replica on '127.0.0.1':10000 |Last modified: