Not able to set priority in ScanPolicy in AS client 5.1.11

Hi,

I am upgrading Aerospike client 4.1.3 → 5.1.11, after upgrade we are facing issue to set priority that was present in Policy. As per below documentation Priority is obsolete and will eventually be removed. Use ScanPolicy.recordsPerSecond instead of priority. https://javadoc.io/static/com.aerospike/aerospike-client/5.0.6.dbg/com/aerospike/client/policy/Policy.html#priority Earlier we were setting Priority.MEDIUM so how can we set in upgraded version.

Hi @Sonam, welcome to the community!

priority was relative to other transactions while recordsPerSecond is absolute. For backwards compatibility the server will default priority.LOW to 5000 rps, but MEDIUM and HIGH will not throttle, going as fast as possible.

With priority being relative, there really isn’t a recommendation to set rps as it is dependent on your what works best for your particular use case. Here is some more information about managing scans.