Search code examples
c#.net-coreignite

Setting the IGNITE_SQL_MERGE_TABLE_MAX_SIZE setting while starting Apache Ignite


I am getting a query exception SQL Error [1] [50000]: General error: "class org.apache.ignite.IgniteException: Fetched result set was too large. IGNITE_SQL_MERGE_TABLE_MAX_SIZE(10000) should be increased.

I am running Ignite embedded within my .net application

Unable to identify how to change this setting in the ignite configuration when starting ignite within a .net application

 igniteConfiguration = new IgniteConfiguration
{
    DataStorageConfiguration = new DataStorageConfiguration
    {
        StoragePath = storagePath,
        DefaultDataRegionConfiguration = new DataRegionConfiguration
        {
            Name = "Default_Region",
            PersistenceEnabled = true,
            InitialSize = 100L * 1024L * 1024L,
            MaxSize = 500L * 1024L * 1024L,
            MetricsRateTimeInterval = TimeSpan.FromMinutes(5)
        }
    },
    AuthenticationEnabled = true,
    Logger = new IgniteLog4NetLogger(log),
    ConsistentId = hostname,
    IgniteInstanceName = hostname,
    ClientMode = false,
    JvmOptions = new[] { "-Xms512m", "-Xmx512m" },
    BinaryConfiguration = new Apache.Ignite.Core.Binary.BinaryConfiguration(new Type[]
    {
        typeof(XYZ),
    }),
    MetricsLogFrequency = TimeSpan.FromMinutes(5),
};

Solution

  • You can set the option using JvmOptions property, as shown in the example below:

    igniteConfiguration = new IgniteConfiguration
    {
        ...
        JvmOptions = new[] { "-Xms512m", "-Xmx512m", "-DIGNITE_SQL_MERGE_TABLE_MAX_SIZE=10000" },
        ...
    };
    

    Also, you can find additional details regarding .NET configuration options here.