After a column store node restarts, in-memory column indexes (IMCIs) enter the LOADING_NCI state while the node rebuilds the mappings between IMCIs and row-oriented data. These mappings enable real-time, high-concurrency data updates for hybrid transactional and analytical processing (HTAP) workloads.
During this period, writes continue uninterrupted, but read behavior changes depending on your parameter configuration. The LOADING_NCI state can last from a few seconds to several hours, depending on the volume of column-oriented data and the cluster specifications.
Check the IMCI state
Query INFORMATION_SCHEMA.IMCI_INDEXES to see the current state of all IMCIs on a column store node.
INDEX_STATE value |
Meaning |
|---|---|
LOADING_NCI |
The column store node has restarted and the index mapping is being rebuilt. Read behavior depends on the imci_enable_read_during_load_nci parameter. |
COMMITTED |
The rebuild is complete. Reads return the latest data in real time. |
| Other | Data cannot be read. |
Impact on writes
Writes to an IMCI in the LOADING_NCI state are not blocked — data continues to be updated in real time. However, because the mapping between the IMCI and row-oriented data has not been fully established, those updates are only cached in the IMCI and cannot be queried immediately.
Impact on read consistency
The imci_enable_read_during_load_nci parameter controls how IMCIs serve read requests during the LOADING_NCI state.
| Index state | imci_enable_read_during_load_nci |
Read behavior |
|---|---|---|
LOADING_NCI |
ON |
Snapshot reads are served. If any IMCI is in LOADING_NCI, all IMCIs fall back to snapshot reads. The snapshot reflects the last complete data snapshot before the column store node failed. |
LOADING_NCI |
OFF |
IMCIs whose data has not changed since the last snapshot can be read (equivalent to COMMITTED). IMCIs with data added, deleted, or modified since the last snapshot cannot be read. |
COMMITTED |
N/A | Latest data is available for reads in real time. |
| Other states | N/A | Data cannot be read. |
Configure the parameter
When set to ON
All IMCIs provide snapshot read service until every IMCI reaches the COMMITTED state. This lets complex queries use IMCI acceleration regardless of whether individual IMCIs are in LOADING_NCI or COMMITTED.
Use this setting when query availability during recovery is more important than read-time data freshness.
If even one IMCI is in LOADING_NCI, all IMCIs fall back to snapshot reads — not just the one still loading.
When set to OFF
IMCIs apply stricter read consistency:
-
IMCIs in
COMMITTEDserve reads using the latest column-oriented data. -
IMCIs in
LOADING_NCIcannot serve real-time reads. Exception: if an IMCI's data has not been modified since the last snapshot, it is treated as equivalent toCOMMITTEDand can be read.
Use this setting when your workload requires that reads always reflect the most recent committed data, and you are willing to accept that some IMCIs may be temporarily unavailable for query acceleration.
Parameter scope and default values
The scope and default value of imci_enable_read_during_load_nci depend on the PolarDB for MySQL Enterprise Edition cluster version:
| Version range | Scope | Default | Restart required to apply changes |
|---|---|---|---|
| V8.0.1.1.29 to V8.0.1.1.36 | Global | OFF (may be ON for some existing clusters) |
Yes |
| V8.0.1.1.37 or later | Session level | OFF |
No |