# Not able to set priority in ScanPolicy in AS client 5.1.11

**URL:** <https://discuss.aerospike.com/t/not-able-to-set-priority-in-scanpolicy-in-as-client-5-1-11/9617>\
**Category:** Upgrading\
**Tags:** java\
**Created:** [July 20, 2022, 6:41am UTC](https://discuss.aerospike.com/t/not-able-to-set-priority-in-scanpolicy-in-as-client-5-1-11/9617 "2022-07-20T06:41:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sonam](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@Sonam](https://discuss.aerospike.com/u/Sonam)\
**Post date:** [July 20, 2022, 6:41am UTC](https://discuss.aerospike.com/t/not-able-to-set-priority-in-scanpolicy-in-as-client-5-1-11/9617/1 "2022-07-20T06:41:18Z")

</div>

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`](https://javadoc.io/static/com.aerospike/aerospike-client/5.0.6.dbg/com/aerospike/client/policy/ScanPolicy.html#recordsPerSecond) instead of priority. [https://javadoc.io/static/com.aerospike/aerospike-client/5.0.6.dbg/com/aerospike/client/policy/Policy.html#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.

---

<div class="post-metadata">

**Author:** ![aanderson](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/aanderson/32/2064_2.png) [@aanderson](https://discuss.aerospike.com/u/aanderson)\
**Post date:** [July 20, 2022, 11:43pm UTC](https://discuss.aerospike.com/t/not-able-to-set-priority-in-scanpolicy-in-as-client-5-1-11/9617/2 "2022-07-20T23:43:25Z")

</div>

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](https://docs.aerospike.com/server/operations/manage/scans#set-priority-and-kill-scan-jobs).
