This section describes how to locate secondary index encoding errors in log files, and then resolve them.
To troubleshoot secondary index encoding errors, follow these steps:
grep command, searching for the
strings index and encoding in the
mfs.log-5
file:# grep -i "index.*encoding" /opt/mapr/logs/mfs.log-5
2018-07-10 11:06:07,7042 INFO DB db/repl/araggregator.cc:524 Table 2050.43.262440 hit index row-key encoding error
2018-07-10 11:06:07,7042 INFO DB db/repl/araggregator.cc:914 Raising alarm VOLUME_ALARM_TABLE_INDEX_ENCODING_ERROR for volume 195503497The
fid, 2050.43.262440, in the sample output indicates the
table corresponding to the alarm. If you are not sure which table this
corresponds to, you can convert the fid to a table path by following the
instructions at Converting fid and volid.
The alarm details indicate the table corresponding to the alarm.
Run dbshell indexscan
with --mode set to err on each
index to see the index's error output. You need to run the command multiple
times if a table has multiple indexes with errors.
table1 has three secondary indexes and all
three secondary indexes have errors, you must run indexscan
three
times:indexscan /table1 --indexname index1 --mode err
indexscan /table1 --indexname index2 --mode err
indexscan /table1 --indexname index3 --mode errdbshell
indexscan command:
maprdb root:> indexscan /IndexEncodingErrorAlarmsTest1/tab1 --indexname idx1 --mode err
{"_id":"100","$ERROR":"Index field 1: INVALID_CAST"} | Error | Suggested Resolutions |
|---|---|
| KEY_TOO_LONG: The collective size of the index key is limited to less than 32 KB. |
|
| INVALID_CAST: An error was encountered applying the CAST function on an indexed field. |
|