All Products
Search
Document Center

Lindorm:Configure cold storage

Last Updated:Jun 05, 2024

Lindorm supports the hot and cold data separation feature. You can store cold data that is infrequently accessed by using cold storage. LindormSearch allows you to configure cold storage for tables. This way, you can store specific data in tables by using cold storage to reduce storage costs. This topic describes how to configure cold storage in LindormSearch.

Prerequisites

Search Shell is downloaded and installed. For more information, see Use Search Shell to connect to and use LindormSearch.

Scenarios

If only a small amount of data needs to be written to a table and only a small number of queries are performed on the table, you can set the storage type attribute of the table to cold storage. If the storage type of a table is set to cold storage, LindormSearch requires a long period of time to obtain the results of queries performed on the table.

Procedure

  1. Enable cold storage. For more information, see Enable cold storage.

  2. Set the storage type attribute of the table to cold storage. The collection_name parameter specifies the name of the table.

    1. Run the RELOAD command. This helps reduce the period of time that is required to migrate cold data to cold storage.

      ./search-cli reload_collection -c collection_name
    2. Run the following command to set the storage type attribute of the table to cold storage:

      ./search-cli modify_collection -c collection_name -s COLD
  3. Run the following command to migrate data from the table to cold storage:

    ./search-cli major_compaction -c collection_name
  4. After the migration is complete, run the following command to release the hot storage capacity: The migration is performed in an asynchronous manner. We recommend that you wait 30 to 60 minutes before you release the hot storage capacity.

    ./search-cli reload_collection -c collection_name