When the aerospike’s client library has been updated to the latest, the following errors have appeared in several places.
- Why did this change come in? ( refs: CHANGELOG aerospike-client-go/CHANGELOG.md at master · aerospike/aerospike-client-go · GitHub)
Key not found
I expect that if there is no key, a record will be created with that key,
- How is the best way to handle it?
my code is like below (for example).
// read operations
op := as.MapGetByKeyOp(idx.BinName, idx.CampaignID, as.MapReturnType.VALUE)
wp := as.NewWritePolicy(0, TTLDontUpdate)
record, err: = db.Aerospike().Operate(wp, key, op)
if err! = nil {
return err
}
// build `value`
value := ....
// write operations
mp := as.DefaultMapPolicy()
op = as.MapPutOp (mp, idx.BinName, idx.CampaignID, value)