When a server node is removed during a partition scan, for some reason, the tracker instance gets set to null (haven't tracked down where this happens as it seemed the lifetime of the tracker was pretty coupled to its use with the command).
All other locations where cmd.tracker are used are protected by a tracker != nil check but the modified one in this PR.
In the case that it is nil, I made a decision to create an error I can observer and handle from my client code but THAT MAY NOT BE THE BEST OPTION HERE.
The main reason I made it return the PARTITION_UNAVAILABLE error is that, before the crashes, I frequently see it logged.
When a server node is removed during a partition scan, for some reason, the tracker instance gets set to null (haven't tracked down where this happens as it seemed the lifetime of the tracker was pretty coupled to its use with the command).
All other locations where cmd.tracker are used are protected by a tracker != nil check but the modified one in this PR.
In the case that it is nil, I made a decision to create an error I can observer and handle from my client code but THAT MAY NOT BE THE BEST OPTION HERE.
The main reason I made it return the PARTITION_UNAVAILABLE error is that, before the crashes, I frequently see it logged.
Here is the bug and a copy of the stack trace:
https://github.com/aerospike/aerospike-client-go/issues/375