<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>pessimistic locking</title><link>https://community.appian.com/discussions/f/best-practices/40366/pessimistic-locking</link><description>I am considering implementing pessimistic locking in Appian. However, I have heard that pessimistic locking can potentially degrade performance because it restricts concurrency. 
 In practice, how much impact does pessimistic locking typically have on</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: pessimistic locking</title><link>https://community.appian.com/thread/154634?ContentTypeID=1</link><pubDate>Tue, 19 May 2026 05:04:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2b6b83cf-9666-478b-8ee6-b1d0a5959e89</guid><dc:creator>shivakanthreddyp0001</dc:creator><description>&lt;p&gt;Hi MM,&lt;/p&gt;
&lt;p&gt;Seems your requirement &amp;quot;the action can be performed by several thousand users at the same time&amp;quot; is against one of the Appian recommendations&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Appian recommendation to race condition.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Security settings - reducing the number of people with access, therefore reducing concurrency&lt;/li&gt;
&lt;li&gt;Business organization - although a wide audience has access, only a select few are considered &amp;quot;owners&amp;quot; and responsible for data updates.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I would&amp;nbsp;suggest looking for alternate approach for your requirement.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pessimistic locking</title><link>https://community.appian.com/thread/154624?ContentTypeID=1</link><pubDate>Mon, 18 May 2026 11:09:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:933e57d2-f99d-48c1-a1e5-720caedd2e79</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;You should find the following a helpful jump-start:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://community.appian.com/b/appmarket/posts/pessimistic-locking"&gt;community.appian.com/.../pessimistic-locking&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pessimistic locking</title><link>https://community.appian.com/thread/154586?ContentTypeID=1</link><pubDate>Tue, 12 May 2026 12:24:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6b750606-a0c7-4129-a874-175682878daa</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="335211" url="~/discussions/f/best-practices/40366/pessimistic-locking/154584"]Appian does not provide a direct equivalent of `SELECT FOR UPDATE`, which means multiple users may end up selecting the same “next” voucher concurrently.[/quote]
&lt;p&gt;If you implement a process that quickly (in successive nodes) does this check-then-write, structured like I described in my prior comment, then users will not be able to do this.&amp;nbsp; Not accidentally, and not even if they&amp;#39;re testing to try to break the system you have set up.&lt;/p&gt;
[quote userid="335211" url="~/discussions/f/best-practices/40366/pessimistic-locking/154584"]&lt;p&gt;whether pessimistic locking on such an object could become a bottleneck or cause noticeable performance degradation.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;If your system can already handle several thousand users working concurrently, a system like the one I described should make little to no performance difference.&lt;/p&gt;
[quote userid="335211" url="~/discussions/f/best-practices/40366/pessimistic-locking/154584"]Any insights would be greatly appreciated[/quote]
&lt;p&gt;Just design something and test it.&amp;nbsp; Keep the lead-up sequence tight, and pay attention to the ordering of the nodes so as to handle the different use cases (e.g. when two users both click the same task within a few seconds of each other from their task lists).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pessimistic locking</title><link>https://community.appian.com/thread/154584?ContentTypeID=1</link><pubDate>Tue, 12 May 2026 11:07:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:bd48b217-2fb6-4915-abfc-0311bdc3837e</guid><dc:creator>MM</dc:creator><description>&lt;p&gt;Sorry for the delayed follow-up, and thank you very much for your responses.&lt;/p&gt;
&lt;p&gt;Thank you for the detailed explanations so far &amp;mdash; they are very helpful.&lt;/p&gt;
&lt;p&gt;Let me add more context about my actual use case, as it seems quite relevant to the DB-backed task example you mentioned.&lt;/p&gt;
&lt;p&gt;In our business scenario, multiple users work together to review and correct already-registered voucher (transaction) records in Appian.&lt;br /&gt;The workflow is not task-based; instead, users pick records from a shared pool and work on them one by one.&lt;/p&gt;
&lt;p&gt;The intended behavior is:&lt;br /&gt;- When a user starts working on a voucher, its status is updated to &amp;ldquo;In Progress&amp;rdquo;.&lt;br /&gt;- The voucher that was previously being handled by the user is set back to &amp;ldquo;Accepted&amp;rdquo; (or a completed state).&lt;br /&gt;- We need to ensure that the same voucher cannot be picked by multiple users at the same time.&lt;/p&gt;
&lt;p&gt;In a traditional database design, this would typically be handled using something like `SELECT FOR UPDATE` to atomically claim the next voucher.&lt;br /&gt;However, as far as I understand, Appian does not provide a direct equivalent of `SELECT FOR UPDATE`, which means multiple users may end up selecting the same &amp;ldquo;next&amp;rdquo; voucher concurrently.&lt;/p&gt;
&lt;p&gt;Because of this limitation, we are considering introducing a dedicated object (or table) to manage voucher assignment and status, and using pessimistic locking to ensure exclusive ownership while a voucher is being edited.&lt;/p&gt;
&lt;p&gt;My concern is scale: in peak periods, several thousand users may perform this operation at roughly the same time.&lt;br /&gt;That raises the question of whether pessimistic locking on such an object could become a bottleneck or cause noticeable performance degradation.&lt;/p&gt;
&lt;p&gt;Given this context, I would appreciate guidance on:&lt;br /&gt;- Whether this type of &amp;ldquo;first-claim-wins&amp;rdquo; record assignment is a reasonable use case for pessimistic locking in Appian&lt;br /&gt;- Any design patterns or architectural techniques to minimize contention and performance impact (for example, batching, sharding, or alternative locking approaches)&lt;br /&gt;- Or whether there is a more Appian-native pattern that would be preferable for this kind of scenario&lt;/p&gt;
&lt;p&gt;Any insights would be greatly appreciated.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pessimistic locking</title><link>https://community.appian.com/thread/154415?ContentTypeID=1</link><pubDate>Mon, 27 Apr 2026 21:28:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1faa3395-82d4-4ac7-a690-42c06abbc428</guid><dc:creator>Mathieu Drouin</dc:creator><description>&lt;p&gt;This article provides a good roundup of the trade offs as well as a App Market implementation&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="/success/w/article/3213/data-locking-strategies"&gt;https://community.appian.com/success/w/article/3213/data-locking-strategies&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pessimistic locking</title><link>https://community.appian.com/thread/154380?ContentTypeID=1</link><pubDate>Thu, 23 Apr 2026 13:45:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3ca1a234-0967-423e-89bd-fd9a61ddefc2</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;This is entirely context dependent.&amp;nbsp; What are you hoping to implement this on?&lt;/p&gt;
&lt;p&gt;For instance, I&amp;#39;ve implemented this before to do database-backed faux-group-tasks - as in, when a user sees a &amp;quot;task list&amp;quot; that&amp;#39;s really queried from a DB where you control who sees the &amp;quot;task names&amp;quot; via whatever databse-backed controls you devise, and clicking the link (instead of actually opening a running task) launches a process that then freshly invokes the actual task.&amp;nbsp; After clicking, a quick DB query establishes that nobody else has opened it yet, and if not, a quick write is made to soft-assign it to that user.&amp;nbsp; If someone else had opened it, the user is routed to a &amp;quot;fallback&amp;quot; task telling them someone has opened it already.&lt;/p&gt;
&lt;p&gt;As long as this is well thought out, and conscientiously designed, the &amp;quot;performance impact&amp;quot; is essentially nothing.&amp;nbsp; It works so quickly that users wouldn&amp;#39;t notice any difference even under stress testing conditions, IIRC.&lt;/p&gt;
&lt;p&gt;But if your use case is something far removed from this (which I have no way of knowing since you didn&amp;#39;t really specify), then I can&amp;#39;t really speak to it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pessimistic locking</title><link>https://community.appian.com/thread/154378?ContentTypeID=1</link><pubDate>Thu, 23 Apr 2026 12:12:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:578d34ab-0294-46bd-893a-cbe9a3696cc1</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Well, if you need locking, the impact is a consequence of that decision.&lt;/p&gt;
&lt;p&gt;My first question would be more like,&amp;nbsp;why do you think you would need locking.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>