aerospike / aerospike-client-go

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

parameter error on put object #264

Closed ewanwalk closed 5 years ago

ewanwalk commented 5 years ago

Hi I have a structure similar to the following:

type Record struct {
    TTL uint32    `as:"-" asm:"ttl"`
    Generation uint32    `as:"-" asm:"gen"`
    CID string    `as:"cid,omitempty"`
    Created int64     `as:"created,omitempty"`
    Country int       `as:"country,omitempty"`
    Referrer string    `as:"referrer,omitempty"`
    Latitude float64   `as:"lat,omitempty"`
    Longitude float64   `as:"long,omitempty"`
    Type int       `as:"type,omitempty"` 
    V2 bool      `as:"v2,omitempty"` 
    Rest string `as:"-"`
}

And am calling PutObject however the server returns Parameter error which does not helpe me in the slightest figure out what I should be changing. Is there any way to figure out what causes a parameter error? Are there specific standard types that arent allowed?

Edit:

ewanwalk commented 5 years ago

This was a mistake on my front! Solved

khaf commented 5 years ago

Could you please put the cause of your issue here in case someone else hits the same problem in the future?

ewanwalk commented 5 years ago

This was a couple things:

Some feedback for the library:

khaf commented 5 years ago

Thanks for your feedback. I'll try to add more documentation for the tags.

The server errors are vague since they are just codes sent back from the server. Aerospike have compromised a bit on the clarity to focus on performance as much as possible.