# How do we know if record has been locked in Aerospike?

**URL:** <https://discuss.aerospike.com/t/how-do-we-know-if-record-has-been-locked-in-aerospike/1318>\
**Category:** General Discussion\
**Created:** [May 27, 2015, 5:56am UTC](https://discuss.aerospike.com/t/how-do-we-know-if-record-has-been-locked-in-aerospike/1318 "2015-05-27T05:56:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mangesh](https://avatars.discourse-cdn.com/v4/letter/m/d78d45/32.png) [@mangesh](https://discuss.aerospike.com/u/mangesh)\
**Post date:** [May 27, 2015, 5:56am UTC](https://discuss.aerospike.com/t/how-do-we-know-if-record-has-been-locked-in-aerospike/1318/1 "2015-05-27T05:56:51Z")

</div>

How to detect if record has been locked in Aerospike?? MySQL/Oracle provide command for checking list of locks on particular table, list of transactions waiting for locks ect. Are these facilities available in Aerospike??

---

<div class="post-metadata">

**Author:** ![helipilot50](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/helipilot50/32/59_2.png) [@helipilot50](https://discuss.aerospike.com/u/helipilot50)\
**Post date:** [May 27, 2015, 7:11pm UTC](https://discuss.aerospike.com/t/how-do-we-know-if-record-has-been-locked-in-aerospike/1318/2 "2015-05-27T19:11:08Z")

</div>

Hi Mangesh,

A record is only locked only for the duration of a read or a write. Locks cannot be held for a longer period.

If many request for a record arrive concurrently, they are placed in a queue and serviced first-in first-out. The default queue size is 20, this can be adjusted in the server configuration file `aerospike.conf` by changing the value `transaction-pending-limit`.

If more requests arrive than the size of the queue, the client will receive the result code of 14 - KEY BUSY.

I hope this helps

Regards

Peter

---

<div class="post-metadata">

**Author:** ![samir](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@samir](https://discuss.aerospike.com/u/samir)\
**Post date:** [May 28, 2015, 3:15am UTC](https://discuss.aerospike.com/t/how-do-we-know-if-record-has-been-locked-in-aerospike/1318/3 "2015-05-28T03:15:16Z")

</div>

Mangesh,

In addition to what helipilot already mentioned, Aerospike doesn’t support multi-record transactions, hence doesn’t have begin\_transaction, end\_transaction semantics similar to what you would find in Oracle, MySQL. This means that the client application cannot explicitly lock a record, but locking/unlocking of a record is handled by the server for very brief period of time, with no control of such locking provided to the client application.

This scheme doesn’t require the client application to know if and when a record is locked.

-samir
