All Products
Search
Document Center

Tablestore:"Don't support allow update operation on table with index and ttl" error when creating a secondary index

Last Updated:Feb 27, 2026

This error occurs because Tablestore requires specific table configurations when combining a secondary index with a custom time to live (TTL) value. Either disable data expiration or prohibit row updates before creating the index.

Error message

ErrorCode: OTSParameterInvalid, ErrorMessage: Don't support allow update operation on table with index and ttl

Cause

A data table with a secondary index must meet one of these conditions:

  • TTL is -1 -- data never expires.

  • TTL is a custom value and TableOptions.AllowUpdate is false.

This error appears when the TTL is not -1 but TableOptions.AllowUpdate is not false.

Solution

Choose one option based on your requirements.

Option 1: Set TTL to -1 (disable data expiration)

Use this option if your data does not need to expire.

Tablestore console

  1. Log on to the Tablestore console and open the target data table.

  2. On the Basic Information tab, click Modify Attributes.

  3. Set Time to Live to -1 and click OK.

Tablestore SDK

Call the UpdateTable operation and set TableOptions.TimeToLive to -1.

Option 2: Prohibit row updates (keep custom TTL)

Use this option if you need data expiration but can disable row updates.

Important

After you prohibit updates, the UpdateRow operation can no longer modify data in this table.

Tablestore console

  1. Log on to the Tablestore console and open the target data table.

  2. On the Basic Information tab, click Modify Attributes.

  3. Set Allow Updates to No, select the checkbox to acknowledge the risk, and click OK.

Tablestore SDK

Call the UpdateTable operation and set TableOptions.AllowUpdate to false.