GridGain Community Edition

Expand all | Collapse all

Co-locating Data - Restarting node with Data

  • 1.  Co-locating Data - Restarting node with Data

    Posted 07-10-2020 08:33 AM
    Hi,
    Gridgain - 8.7.17 CE
    I'm using below DDL for default xml configuration added only with persistanceEnabled set to true

    CREATE TABLE IF NOT EXISTS "PUBLIC".CITY_TEST(
    cityId VARCHAR,
    mayor VARCHAR,
    countryID VARCHAR,
    name VARCHAR,
    PRIMARY KEY(cityId,countryID )
    )WITH "template=partitioned,backups=0,CACHE_NAME=SQL_CITY_CACHE,affinity_key=countryID ,KEY_TYPE=CityDataKey,VALUE_TYPE=CityData";


    I'm running 3 nodes and pushing data to CITY_TEST of 3 countries. When I bring one node, I can see data from remaining 2 nodes having data of 2 countries.
    But after running up the node, I can't see the data of 3rd country.

    It is giving up :
    SQL Error [1] [50000]: class org.apache.ignite.internal.processors.cache.CacheInvalidStateException: Failed to execute query because cache partition has been lostPart [cacheName=SQL_CITY_CACHE, part=177].

    I wanna try out with "backups=0"

    Can some one help me on this?

    ------------------------------
    Saikiran Boppudi
    SSE
    Nisum
    ------------------------------


  • 2.  RE: Co-locating Data - Restarting node with Data

    Posted 07-10-2020 11:14 AM
    Hi,
       Looks like a partition w/the data was not found.
       If you are using persistence, clean the work dir and try again, otherwise restart the cluster and retry your scenario.
       backups=0 means once partitions are lost, data that resided in them is not recoverable. This is not recommended.
       see: https://www.gridgain.com/docs/latest/developers-guide/data-modeling/data-partitioning#partitioned

      Here is a guide to handling partition loss: https://www.gridgain.com/docs/latest/developers-guide/partition-loss-policy

       If you are able to reproduce this scenario then send the full logs, a list of steps/reproducer, and I will take a look.

       It is recommended that you upgrade to the latest version: https://www.gridgain.com/resources/download
    Thanks, Alex

    ------------------------------
    Alexander
    GridGain
    ------------------------------