We’re using the ScanAll function and we’re not getting back all the records in the set.
I’m only getting back one record using ScanAll() –
recs, _ := client.ScanAll(nil, "test", "accounts")
for rec := range recs.Records {
fmt.Println(rec)
}
I’m getting back all my records when using aql —
aql > select * FROM test.accounts
Which version of the client are you using? Please make sure you are using the latest version.
There are elaborate tests for scan in the test suite.
Does
$ ginkgo -focus Scan – -h
pass?
I’m running the most recent version of the client.
Ginko fails with large lists/maps but that’s probably because I don’t have ldt-enabled set as true in my docker configuration.
In production we’re using Aerospike Enterprise 3.4.1 for Ubuntu
Could you use this snippet to see if there’s an error coming back?
L:
for{
select {
case record := <- recordset.Records:
if record == nil {
// scan completed successfully
break L
} else {
// do something
fmt.Println(record.Bins)
}
case err := <- recordset.Errors:
// check if error is a NodeError
panic(err)
}
}
Sorry I cannot get the code block formatted correctly.
My apologies for the inconvenience.
I’m getting “panic: nil” after printing 3 of the 7 records
This means the channel is getting closed too soon (either because of an error, or a bug in the library).
Please change:
panic(err)
to
if err != nil {
panic(err)
}
to see if a value comes back from the channel.
If it is still nil, then I’d appreciate it if you could provide some hints regarding your configuration and possibly a small code snippet to reproduce the problem so that I can investigate.