aerospike / aerospike-client-go

Aerospike Client Go
Apache License 2.0
429 stars 199 forks source link

[Error] ParticleType 20 not recognized #350

Closed namkazt closed 3 years ago

namkazt commented 3 years ago

Hello,

Today I just got an error:

Node BB9C50F840A0142 xxx.xxx.xxx.xxx:3000: ParticleType 20 not recognized. Please file a github issue.
got an error while iterating results:

Query:

    if to.Unix() >= now.New(to).BeginningOfDay().Unix() {
        sinceUpdate := to.Unix() - from.Unix()
        exps = append(exps, aerospike.ExpLessEq(aerospike.ExpSinceUpdate(), aerospike.ExpIntVal(sinceUpdate*sec2milisec)))
    } else {
        exps = append(exps, aerospike.ExpGreaterEq(aerospike.ExpLastUpdate(), aerospike.ExpIntVal(secondsToNano(from.Unix()))))
        exps = append(exps, aerospike.ExpGreaterEq(aerospike.ExpListGetByValueRange(
            aerospike.ListReturnTypeCount,
            aerospike.ExpIntVal(from.Unix()),
            aerospike.ExpIntVal(to.Unix()),
            aerospike.ExpListBin("timestamps"),
        ), aerospike.ExpIntVal(1)))
    }

Lib version: github.com/aerospike/aerospike-client-go v4.5.0

It parsed few records and this happened image

khaf commented 3 years ago

Sorry for the late reply, this issue flew below my radar somehow. Will take a look and get back to you ASAP.

khaf commented 3 years ago

It seems that you are using Lists in your keys. Is that correct?

namkazt commented 3 years ago

Yes, I'm using []interface{ A, B, C} in some cases.

khaf commented 3 years ago

Should be fixed in v4.5.2. Keep in mind that complex keys have been deprecated in the v5 version, and key types other than int types, string and []byte are not directly supported, and should be converted to one of these aforementioned types manually. If your app is not in production and you plan to move forward, I suggest you work your way around this limitation now before it gets painful.

namkazt commented 3 years ago

thank you @khaf