Конфигурация Ignite Cache не отражается на клиенте golang - PullRequest
0 голосов
/ 18 февраля 2020

Я использую go воспламенит клиент для создания кэша с конфигурацией ниже


    err = ic.CacheGetOrCreateWithConfiguration(&ignite.CacheConfigurationRefs{
        AtomicityMode: &aMode,
        Backups: func(b int32) *int32 {return &b} (1),
        CacheMode: pointer.Int32(1),
        CopyOnRead: pointer.Bool(true),
        DataRegionName: pointer.String("EventRegion"),
        EagerTTL: pointer.Bool(true),
        EnableStatistics: pointer.Bool(true),
        Name: pointer.String("EventCache"),
        GroupName: pointer.String(""),

    })

    if(err != nil){
        log.Fatal("Error Creating Cache , Error = ", err)
    }

    cconfig,err := ic.CacheGetConfiguration("EventCache",0)
    cv,_ := json.Marshal(cconfig)
    println("Config Values for Cache in ADD = ",string(cv))

Но «CacheGetConfiguration» (повторный запрос конфигурации) не показывает правильную конфигурацию, ниже выводится

Config Values for Cache = {"AtomicityMode":1,"Backups":0,"CacheMode":2,"CopyOnRead":true,"DataRegionName":"","EagerTTL":true,"EnableStatistics":false,"GroupName":"","LockTimeout":0,"M axConcurrentAsyncOperations":500,"MaxQueryIterators":1024,"Name":"EventCache","OnheapCacheEnabled":false,"PartitionLossPolicy":4,"QueryDetailMetricsSize":0,"QueryParellelism":1,"ReadFr omBackup":true,"RebalanceBatchSize":524288,"RebalanceBatchesPrefetchCount":2,"RebalanceDelay":0,"RebalanceMode":1,"RebalanceOrder":0,"RebalanceThrottle":0,"RebalanceTimeout":10000,"SQL EscapeAll":false,"SQLIndexInlineMaxSize":-1,"SQLSchema":"","WriteSynchronizationMode":2,"CacheKeyConfigurations":[],"QueryEntities":[]} {"time":"2020-02-18T07:12:02.391472-08:00","id":"","remote_ip":"::1","host":"localhost:8080","method":"GET","uri":"/events/201","user_agent":"PostmanRuntime/7.22.0","status":200,"error":"","latency":37211239,"latency_human":"37.211239ms","bytes_in":64,"bytes_out":55}

...