# locking

Locking is a computing technique for synchronizing access to shared resources through mutual exclusion, ensuring that at most one thread executes a protected section at a time.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## New in Symfony 8.2: Lock Improvements

DevFeed: [New in Symfony 8.2: Lock Improvements](<https://devfeed.tech/articles/new-in-symfony-8-2-lock-improvements-144645.md>)

Original publisher: [Read original article](<https://symfony.com/blog/new-in-symfony-8-2-lock-improvements>)

Author: Javier Eguiluz

Published: 2026-11-19T08:17:00Z

Content type: release

Language: en

Sources: [Symfony](<https://devfeed.tech/sources/symfony-blog.md>)

Topics: [locking](<https://devfeed.tech/topics/locking.md>), [Symfony](<https://devfeed.tech/topics/symfony.md>), [rdbms](<https://devfeed.tech/topics/rdbms.md>), [PHP Data Objects (PDO)](<https://devfeed.tech/topics/pdo.md>), [synchronization](<https://devfeed.tech/topics/synchronization.md>)

Tags: [application](<https://devfeed.tech/tags/application.md>), [blocking](<https://devfeed.tech/tags/blocking.md>), [component](<https://devfeed.tech/tags/component.md>), [database](<https://devfeed.tech/tags/database.md>), [databases](<https://devfeed.tech/tags/databases.md>), [files](<https://devfeed.tech/tags/files.md>), [flock](<https://devfeed.tech/tags/flock.md>), [lock](<https://devfeed.tech/tags/lock.md>), [mariadb](<https://devfeed.tech/tags/mariadb.md>), [memory](<https://devfeed.tech/tags/memory.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [native](<https://devfeed.tech/tags/native.md>), [redis](<https://devfeed.tech/tags/redis.md>), [symfony](<https://devfeed.tech/tags/symfony.md>)

### AI overview

Symfony 8.2 adds MySQL and MariaDB advisory-lock stores: `MysqlStore` uses PDO and `DoctrineDbalMysqlStore` uses Doctrine DBAL. They support native blocking, need no TTL, and require MySQL 5.7.5 or MariaDB 10.0.2 or newer; because MySQL lacks shared advisory locks, `acquireRead()` is exclusive. Advisory locks are tied to the database session and vanish if the connection closes or reconnects, so the excerpt recommends a dedicated connection. Existing connections can opt in with `advisory: true`; unsupported databases raise an exception. For file locks, `flock+remove` or `removeOnRelease: true` deletes lock files after exclusive release, reducing file buildup at the cost of slower repeated acquisition. All processes sharing the directory must use the same setting.

### Source excerpt

The Lock component provides exclusive access to shared resources through many stores: files, semaphores, Redis, databases, etc. Symfony 8.2 added a #[Lock] attribute for controllers and also improves the stores themselves, focusing on database advisory locks:...

## Optimizing Geo-replicated Deterministic Databases

DevFeed: [Optimizing Geo-replicated Deterministic Databases](<https://devfeed.tech/articles/optimizing-geo-replicated-deterministic-databases-118116.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.05882>)

Author: Yunhao Mao, Shiquan Zhang, Gengrui Zhang, Hans-Arno Jacobsen

Published: 2026-11-05T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Databases](<https://devfeed.tech/sources/arxiv-databases.md>)

Topics: [database-optimization](<https://devfeed.tech/topics/database-optimization.md>), [Replication](<https://devfeed.tech/topics/replication.md>), [Transactions](<https://devfeed.tech/topics/transactions.md>), [strict-serializability](<https://devfeed.tech/topics/strict-serializability.md>), [consistency](<https://devfeed.tech/topics/consistency.md>), [performance-engineering](<https://devfeed.tech/topics/performance-engineering.md>), [crdt](<https://devfeed.tech/topics/crdt.md>), [locking](<https://devfeed.tech/topics/locking.md>)

Tags: [active-active](<https://devfeed.tech/tags/active-active.md>), [analysis](<https://devfeed.tech/tags/analysis.md>), [batch](<https://devfeed.tech/tags/batch.md>), [commit](<https://devfeed.tech/tags/commit.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [concurrency-control](<https://devfeed.tech/tags/concurrency-control.md>), [cs-db](<https://devfeed.tech/tags/cs-db.md>), [databases](<https://devfeed.tech/tags/databases.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [execution](<https://devfeed.tech/tags/execution.md>), [fast](<https://devfeed.tech/tags/fast.md>), [geo](<https://devfeed.tech/tags/geo.md>), [integration](<https://devfeed.tech/tags/integration.md>), [locking](<https://devfeed.tech/tags/locking.md>), [model](<https://devfeed.tech/tags/model.md>), [optimistic-concurrency](<https://devfeed.tech/tags/optimistic-concurrency.md>), [optimizations](<https://devfeed.tech/tags/optimizations.md>), [optimizing](<https://devfeed.tech/tags/optimizing.md>), [order](<https://devfeed.tech/tags/order.md>), [performance](<https://devfeed.tech/tags/performance.md>), [replication](<https://devfeed.tech/tags/replication.md>)

### AI overview

Deterministic concurrency control (DCC) can reduce coordination costs in geo-replicated databases by globally ordering transaction batches before execution. The paper analyzes DCC against two-phase locking and optimistic concurrency control, identifying conditions where DCC is advantageous, and presents Quirinus, which adds speculative execution, transaction reordering, CRDT integration, and fast-path commit. In the reported configuration, Quirinus achieves up to 6.2x TPC-C throughput versus Tiga even without those optimizations.

### Source excerpt

arXiv:2611.05882v1 Announce Type: new Abstract: In transactional databases, achieving active-active replication among geo-distributed replicas is challenging due to the high coordination cost in ensuring the serializability of concurrent cross-node transactions. Deterministic concurrency control (DCC) has emerged as a promising alternative: it establishes a global order for a batch of transactions before execution and thereby amortizes this coordination cost across the batch. To better understand the performance characteristics of DCC, we conduct a theoretical analysis of traditional two-phase locking and optimistic concurrency control to account for geo-replication and introduce a model for DCC. We compare the three paradigms and identify the conditions under which DCC is advantageous. Guided by the insights from this analysis, we then present Quirinus, a DCC-based geo-replicated database that optimizes transaction execution through speculative execution, transaction reordering, integration of conflict-free replicated data types (CRDTs), and fast-path commit. Even without these optimizations, Quirinus achieves up to 6.2x the TPC-C throughput of Tiga under our configuration.

## Understanding Lazy thread safety modes

DevFeed: [Understanding Lazy thread safety modes](<https://devfeed.tech/articles/understanding-lazy-thread-safety-modes-116292.md>)

Original publisher: [Read original article](<https://andrewlock.net/understanding-lazy-thread-safety-modes/>)

Author: Andrew Lock

Published: 2026-11-03T10:00:00Z

Content type: article

Language: en

Sources: [Andrew Lock | .NET Escapades](<https://devfeed.tech/sources/andrew-lock-net-escapades.md>)

Topics: [thread safe data sharing](<https://devfeed.tech/topics/thread-safe-data-sharing.md>), [Exception](<https://devfeed.tech/topics/exception.md>), [locking](<https://devfeed.tech/topics/locking.md>)

Tags: [caching](<https://devfeed.tech/tags/caching.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [concurrent](<https://devfeed.tech/tags/concurrent.md>), [exceptions](<https://devfeed.tech/tags/exceptions.md>), [lazy](<https://devfeed.tech/tags/lazy.md>), [net-core](<https://devfeed.tech/tags/net-core.md>), [thread](<https://devfeed.tech/tags/thread.md>), [thread-safety](<https://devfeed.tech/tags/thread-safety.md>)

### AI overview

`Lazy<T>` defers factory execution until `Value` is accessed. `None` is for single-threaded use and caches factory exceptions; concurrent access is unsafe. `PublicationOnly` lets concurrent callers run the factory independently, publishes the first successful result for everyone, and does not cache exceptions--each factory call that throws still reports its own exception. `ExecutionAndPublication` runs the factory once while other callers wait, and caches any exception, so later accesses keep throwing it. The article says `ExecutionAndPublication` avoids duplicate work and allocations, while `PublicationOnly` may be faster when initialization is cheap, safe to repeat, and lock contention is significant. `LazyInitializer.EnsureInitialized` offers similar publication behaviors without a `Lazy<T>` allocation and does not cache exceptions. A proposed `cacheExceptions` option was approved but was not yet implemented in the described account.

### Source excerpt

In this post I look at how the different `LazyThreadSafetyMode` values work with `Lazy`, and how exceptions are handled for each mode

## Resource Locks and Fast Unlock for Shared Balances in Certificate-Based Payment Systems

DevFeed: [Resource Locks and Fast Unlock for Shared Balances in Certificate-Based Payment Systems](<https://devfeed.tech/articles/resource-locks-and-fast-unlock-for-shared-balances-in-certificate-based-payment-systems-111750.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2610.41207>)

Author: Lingkang Shangguan

Published: 2026-11-02T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Distributed Computing](<https://devfeed.tech/sources/arxiv-distributed-computing.md>)

Topics: [consistency](<https://devfeed.tech/topics/consistency.md>), [locking](<https://devfeed.tech/topics/locking.md>), [synchronization](<https://devfeed.tech/topics/synchronization.md>), [race-condition](<https://devfeed.tech/topics/race-condition.md>)

Tags: [certificate](<https://devfeed.tech/tags/certificate.md>), [computer](<https://devfeed.tech/tags/computer.md>), [computer-science](<https://devfeed.tech/tags/computer-science.md>), [computing](<https://devfeed.tech/tags/computing.md>), [consensus](<https://devfeed.tech/tags/consensus.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [cs-dc](<https://devfeed.tech/tags/cs-dc.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [echo](<https://devfeed.tech/tags/echo.md>), [freeze](<https://devfeed.tech/tags/freeze.md>), [locks](<https://devfeed.tech/tags/locks.md>), [payment](<https://devfeed.tech/tags/payment.md>), [payment-systems](<https://devfeed.tech/tags/payment-systems.md>), [resource](<https://devfeed.tech/tags/resource.md>), [stablecoin](<https://devfeed.tech/tags/stablecoin.md>), [stablecoin-payments](<https://devfeed.tech/tags/stablecoin-payments.md>), [subscriptions](<https://devfeed.tech/tags/subscriptions.md>), [transactions](<https://devfeed.tech/tags/transactions.md>), [version](<https://devfeed.tech/tags/version.md>)

### AI overview

The abstract argues that safe unlocking of shared balances requires validators to see certificate formation: a quorum certificate kept private by a client could otherwise be overridden during concurrent debits. Its hybrid protocol leaves personal accounts on FastPay's client-driven path, while shared balances have a version number and authorized accounts. Shared-resource transactions go to any validator and use ECHO/READY broadcast; admission requires both the sender's nonce and the resource's nonce to be free. With no contention, the path needs no consensus. If concurrent debits split votes, validators detect the split, freeze that resource version, and use one agreement instance scoped to it; losing transactions regain their sender nonce. The abstract claims consistency, no overdraft, validity, finality, and liveness, and says the protocol composes with PDCC reconfiguration.

### Source excerpt

arXiv:2610.41207v1 Announce Type: new Abstract: Certificate-based payment systems such as FastPay settle a payment with one round of signatures from a quorum of validators and avoid global ordering. The client collects the signatures, and validators never talk to each other. We observe that this client-driven design is complete only as long as no lock is ever undone. Each account has a single writer, a conflict can only come from that writer's own misbehavior, and the account stays locked as the penalty. Stablecoin payments routinely need balances that several accounts debit: treasuries, merchant pools, allowances and subscriptions. There, honest accounts race, locks must be undone, and a quorum certificate held privately by a client can be silently overridden. We prove that no unlock rule is safe in this setting unless certificate formation is visible to validators. We present a hybrid protocol. Personal accounts keep the client-driven FastPay path unchanged. A shared resource is a balance with its own version number and a set of authorized accounts. Transactions on shared resources are submitted to any validator and certified by a two-phase broadcast, ECHO then READY. The admission check requires both the sender's nonce and the resource's nonce to be free. Without contention, this path needs no consensus. When concurrent debits split the votes in any proportion, validators detect the split themselves, freeze the affected resource version, and resolve it with one agreement instance scoped to that version. Losing transactions return their sender nonce. We prove consistency, no overdraft, validity, finality and liveness. The protocol composes with the PDCC reconfiguration protocol.

## Access, Legible State and Recomputation in a Three-Model Harness

DevFeed: [Access, Legible State and Recomputation in a Three-Model Harness](<https://devfeed.tech/articles/access-legible-state-and-recomputation-in-a-three-model-harness-110589.md>)

Original publisher: [Read original article](<https://sgeos.github.io/ai/ai-tools/development/developer-productivity/2026/10/31/dromon_three_models_equations_sections.html>)

Author: Brendan Sechter

Published: 2026-10-31T21:15:00Z

Content type: opinion

Language: en

Sources: [Brendan A R Sechter's Development Blog](<https://devfeed.tech/sources/brendan-a-r-sechter-s-development-blog.md>)

Topics: [Agent Harness](<https://devfeed.tech/topics/agent-harness.md>), [LLM observability](<https://devfeed.tech/topics/llm-observability.md>), [LLM security](<https://devfeed.tech/topics/llm-security.md>), [Post Mortem](<https://devfeed.tech/topics/post-mortem.md>), [locking](<https://devfeed.tech/topics/locking.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [Parallel reasoning](<https://devfeed.tech/topics/parallel-reasoning.md>), [Claude](<https://devfeed.tech/topics/claude.md>)

Tags: [2026](<https://devfeed.tech/tags/2026.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-tools](<https://devfeed.tech/tags/ai-tools.md>), [anthropic](<https://devfeed.tech/tags/anthropic.md>), [blog](<https://devfeed.tech/tags/blog.md>), [body](<https://devfeed.tech/tags/body.md>), [classification](<https://devfeed.tech/tags/classification.md>), [claude-opus-5-5](<https://devfeed.tech/tags/claude-opus-5-5.md>), [developer-productivity](<https://devfeed.tech/tags/developer-productivity.md>), [development](<https://devfeed.tech/tags/development.md>), [gpt](<https://devfeed.tech/tags/gpt.md>), [gpt-6-luna](<https://devfeed.tech/tags/gpt-6-luna.md>), [grok](<https://devfeed.tech/tags/grok.md>), [grok-4-7](<https://devfeed.tech/tags/grok-4-7.md>), [harness](<https://devfeed.tech/tags/harness.md>), [language-models](<https://devfeed.tech/tags/language-models.md>), [model](<https://devfeed.tech/tags/model.md>), [october-2026](<https://devfeed.tech/tags/october-2026.md>), [openai](<https://devfeed.tech/tags/openai.md>), [planes](<https://devfeed.tech/tags/planes.md>), [state](<https://devfeed.tech/tags/state.md>), [xai](<https://devfeed.tech/tags/xai.md>)

### AI overview

Three models from Anthropic, OpenAI and xAI used the Dromon harness to add Equations sections to four X-Planes articles omitted from an earlier pass. They classified 483 displayed equations, corrected seven errors and dependent values, and passed the deploy gate. The account finds that opaque tool refusals blocked work, asynchronous mail and incomplete status information caused coordination errors, and agreement between reviewers sometimes preserved mistakes or removed a correct observation. Independent recomputation caught missed values and later confirmed the corrections, though the third line's check came after publication. The authors judge all three controls--access to a turn, legible coordination state and recomputation--supported by this case, while limiting the conclusion: it is one trial with only two lines working for much of it, and the original refusal's cause remains unknown.

### Source excerpt

This article reports how three language models from three companies finished one editorial task on this blog together, and what failed along the way. Four articles in the X-Planes series, the Bell X-9 Shrike, the North American X-10, the Convair X-11 and the Convair X-12, were the last on the blog without an Equations section X-9 X-10 X-11 X-12. They had been left out of the general pass that brought every other article to that format, because the session running that pass was stopped partway by its own safety check. The three models worked inside a harness called Dromon. They were Claude Opus 5.5 from Anthropic, GPT-6-Luna from OpenAI and Grok 4.7 from xAI. The trial ran on 30 and 31 October 2026. The usual rule of this blog is that an article never reports how it was drafted. This article is the exception by the pilot's instruction, because its subject is its own making. Its authors are the three lines it describes. Each section was written by one line and reviewed by another, and every figure was recomputed by its reviewer. Each claim is classed as a fact, an inference or a judgement in the Epistemic State section. The Problem An Equations section closes the body of an equation-bearing article on this blog. Every display equation in the body carries a numbered tag, and the section lists each one by number with a title, a one-sentence gloss, any citations and a notation key Equations Section Convention. The section is generated from a data file and checked against the body by a content digest. The human judgement in the data file is classification. A standard equation states an established result, or evaluates one with inputs the article takes from its sources. A bespoke equation is a construction the article makes for itself, or an evaluation that rests on an assumed value, and its gloss names that assumption. The general pass ran in two stages. One stage migrated A290 to A368 and produced validated files for 75 articles, A290 to A305 and A310 to A368. In the oth

## CVE-2026-61854 - VoiceSentinel: Race condition in report buffer cleanup can corrupt transcript data and cause unbounded disk growth

DevFeed: [CVE-2026-61854 - VoiceSentinel: Race condition in report buffer cleanup can corrupt transcript data and cause unbounded disk growth](<https://devfeed.tech/articles/cve-2026-61854-voicesentinel-race-condition-in-report-buffer-cleanup-can-corrupt-transcript-data-and-cause-unbounded-disk-growth-109183.md>)

Original publisher: [Read original article](<https://cvefeed.io/vuln/detail/CVE-2026-61854>)

Author: CVEFEED.io

Published: 2026-10-30T18:25:28Z

Content type: news

Language: en

Sources: [Latest High/Critical Vulnerabilitiy Feed](<https://devfeed.tech/sources/latest-high-critical-vulnerabilitiy-feed.md>)

Topics: [race-condition](<https://devfeed.tech/topics/race-condition.md>), [shared mutable state](<https://devfeed.tech/topics/shared-mutable-state.md>), [thread safe data sharing](<https://devfeed.tech/topics/thread-safe-data-sharing.md>), [locking](<https://devfeed.tech/topics/locking.md>)

Tags: [2026](<https://devfeed.tech/tags/2026.md>), [async](<https://devfeed.tech/tags/async.md>), [asyncio](<https://devfeed.tech/tags/asyncio.md>), [atomic](<https://devfeed.tech/tags/atomic.md>), [buffer](<https://devfeed.tech/tags/buffer.md>), [can](<https://devfeed.tech/tags/can.md>), [cause](<https://devfeed.tech/tags/cause.md>), [cleanup](<https://devfeed.tech/tags/cleanup.md>), [concurrent](<https://devfeed.tech/tags/concurrent.md>), [condition](<https://devfeed.tech/tags/condition.md>), [crash](<https://devfeed.tech/tags/crash.md>), [cve](<https://devfeed.tech/tags/cve.md>), [cve-2026-61854](<https://devfeed.tech/tags/cve-2026-61854.md>), [cvss](<https://devfeed.tech/tags/cvss.md>), [data](<https://devfeed.tech/tags/data.md>), [feature](<https://devfeed.tech/tags/feature.md>), [growth](<https://devfeed.tech/tags/growth.md>), [race-condition](<https://devfeed.tech/tags/race-condition.md>), [report](<https://devfeed.tech/tags/report.md>), [transcript](<https://devfeed.tech/tags/transcript.md>)

### AI overview

In VoiceSentinel versions 2.2.1 through before 3.3.1, the optional report buffer can race when retention cleanup rewrites a tenant's transcripts.jsonl while unsynchronized writes append to it. Concurrent cleanup and writes may lose, duplicate, or corrupt transcripts and defeat retention pruning, allowing disk use to grow without bound and potentially crash the host or other services sharing its storage. The issue is reachable during normal operation; worker_count of at least two and shared server_key values increase collisions. The feature is disabled by default, and the description says the issue is fixed in 3.3.1.

### Source excerpt

CVE ID :CVE-2026-61854 Published : Oct. 30, 2026, 6:25 p.m. | 49 minutes ago Description :VoiceSentinel is a real-time voice moderation system for Minecraft servers. From 2.2.1 until 3.3.1, the optional report buffer feature has a race between retention cleanup and normal transcript writes. In `report_buffer.py`, `_maybe_cleanup()` uses an unlocked dictionary for once-per-hour cleanup throttling, allowing simultaneous `_cleanup_tenant()` operations for one tenant. Cleanup reads `transcripts.jsonl` and rewrites it in place without file locking or atomic replacement, while `report_buffer_append_async` uses `asyncio.to_thread` to append without synchronization. In `main.py`, concurrent `_processing_worker` tasks make this reachable in normal operation; `processing.worker_count` of two or more and public-pool servers sharing a `server_key` increase collisions. With `report_buffer.enabled` set to true, racing writes can lose, duplicate or corrupt transcript data and defeat `report_buffer.retention_seconds` pruning, allowing unbounded disk growth that can exhaust storage and crash the host or other services sharing it. The feature is opt-in and disabled by default. This issue is fixed in version 3.3.1. Severity: 8.2 | HIGH Visit the link for more details, such as CVSS details, affected products, timeline, and more...

## Hapax Locks : Value-Based Mutual Exclusion

DevFeed: [Hapax Locks : Value-Based Mutual Exclusion](<https://devfeed.tech/articles/hapax-locks-value-based-mutual-exclusion-101574.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2511.14608>)

Author: Dave Dice, Alex Kogan

Published: 2026-10-27T04:00:00Z

Content type: article

Language: en

Sources: [arXiv: Distributed Computing](<https://devfeed.tech/sources/arxiv-distributed-computing.md>)

Topics: [locking](<https://devfeed.tech/topics/locking.md>)

Tags: [admission](<https://devfeed.tech/tags/admission.md>), [algorithm](<https://devfeed.tech/tags/algorithm.md>), [coherence](<https://devfeed.tech/tags/coherence.md>), [cs-dc](<https://devfeed.tech/tags/cs-dc.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [latency](<https://devfeed.tech/tags/latency.md>), [locking](<https://devfeed.tech/tags/locking.md>), [locks](<https://devfeed.tech/tags/locks.md>), [ownership](<https://devfeed.tech/tags/ownership.md>), [programming-interfaces](<https://devfeed.tech/tags/programming-interfaces.md>), [runtime](<https://devfeed.tech/tags/runtime.md>), [scalability](<https://devfeed.tech/tags/scalability.md>), [space](<https://devfeed.tech/tags/space.md>)

### AI overview

Hapax Locks is a mutual exclusion algorithm with constant-time arrival and unlock paths and FIFO admission. The abstract describes it as space efficient, with relatively little coherence traffic under contention in the common case, and reports latency and scalability comparable to leading locks. Its stated integration advantage is that it places fewer constraints on the runtime and can fit existing systems or application programming interfaces; pointers do not shift or escape ownership between threads. These are claims from the abstract; the supplied text gives no supporting measurements or detailed comparisons.

### Source excerpt

arXiv:2511.14608v4 Announce Type: replace Abstract: We present Hapax Locks, a novel locking algorithm that is simple, enjoys constant-time arrival and unlock paths, provides FIFO admission order, and which is also space efficient and generates relatively little coherence traffic under contention in the common case. Hapax Locks offer performance (both latency and scalability) that is comparable with the best state of the art locks, while at the same time Hapax Locks impose fewer constraints and dependencies on the ambient runtime environment, making them particularly easy to integrate or retrofit into existing systems or under existing application programming interfaces Of particular note, no pointers shift or escape ownership between threads in our algorithm.

## What Is the Python Global Interpreter Lock (GIL)?

DevFeed: [What Is the Python Global Interpreter Lock (GIL)?](<https://devfeed.tech/articles/what-is-the-python-global-interpreter-lock-gil-97822.md>)

Original publisher: [Read original article](<https://realpython.com/python-gil/>)

Author: Abhinav Ajitsaria

Published: 2026-10-23T14:00:00Z

Content type: article

Language: en

Sources: [Real Python](<https://devfeed.tech/sources/real-python.md>)

Topics: [locking](<https://devfeed.tech/topics/locking.md>), [Python](<https://devfeed.tech/topics/python.md>), [Process](<https://devfeed.tech/topics/process.md>), [scheduling](<https://devfeed.tech/topics/scheduling.md>)

Tags: [acquisition](<https://devfeed.tech/tags/acquisition.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [argument](<https://devfeed.tech/tags/argument.md>), [bugs](<https://devfeed.tech/tags/bugs.md>), [build](<https://devfeed.tech/tags/build.md>), [bytecode](<https://devfeed.tech/tags/bytecode.md>), [c](<https://devfeed.tech/tags/c.md>), [c-sharp](<https://devfeed.tech/tags/c-sharp.md>), [code](<https://devfeed.tech/tags/code.md>), [collection](<https://devfeed.tech/tags/collection.md>), [compilers](<https://devfeed.tech/tags/compilers.md>), [core](<https://devfeed.tech/tags/core.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [cpython](<https://devfeed.tech/tags/cpython.md>), [gil](<https://devfeed.tech/tags/gil.md>), [interpreter](<https://devfeed.tech/tags/interpreter.md>), [mutex](<https://devfeed.tech/tags/mutex.md>), [performance](<https://devfeed.tech/tags/performance.md>), [python](<https://devfeed.tech/tags/python.md>), [thread](<https://devfeed.tech/tags/thread.md>)

### AI overview

CPython's GIL protects shared reference counts with one interpreter-wide lock, but it allows only one thread to execute Python bytecode at a time. That makes CPU-bound multithreaded work unable to use multiple cores and can add lock overhead; I/O-bound threads are less affected, though older GIL scheduling could starve them. The text compares multiprocessing, which enables parallel execution at the cost of process overhead and separate memory, with subinterpreters, which provide per-interpreter GILs and isolation within one process. It also notes that GIL behavior differs among Python implementations. Free-threaded CPython builds are available from Python 3.13 and officially supported in 3.14, but remain optional, and extensions must declare compatibility or the GIL is re-enabled. The default CPython build still uses the GIL.

### Source excerpt

The Python GIL is a mutex that lets only one thread control the interpreter at a time. Learn how it shapes your program's performance.

## I don't trust ON DELETE CASCADE

DevFeed: [I don't trust ON DELETE CASCADE](<https://devfeed.tech/articles/i-don-t-trust-on-delete-cascade-92987.md>)

Original publisher: [Read original article](<https://planetscale.com/blog/i-dont-like-delete-cascade>)

Author: Tom Pang

Published: 2026-10-21T00:00:00Z

Content type: opinion

Language: en

Sources: [PlanetScale](<https://devfeed.tech/sources/blog-planetscale.md>)

Topics: [locking](<https://devfeed.tech/topics/locking.md>), [Database Migration](<https://devfeed.tech/topics/database-migration.md>), [Transactions](<https://devfeed.tech/topics/transactions.md>), [rdbms](<https://devfeed.tech/topics/rdbms.md>), [schema design](<https://devfeed.tech/topics/schema-design.md>), [database-consistency](<https://devfeed.tech/topics/database-consistency.md>), [CRUD](<https://devfeed.tech/topics/crud.md>), [expand and contract migration](<https://devfeed.tech/topics/expand-and-contract-migration.md>)

Tags: [alter](<https://devfeed.tech/tags/alter.md>), [application](<https://devfeed.tech/tags/application.md>), [apply](<https://devfeed.tech/tags/apply.md>), [batch](<https://devfeed.tech/tags/batch.md>), [built-in](<https://devfeed.tech/tags/built-in.md>), [cascade](<https://devfeed.tech/tags/cascade.md>), [children](<https://devfeed.tech/tags/children.md>), [database](<https://devfeed.tech/tags/database.md>), [database-design](<https://devfeed.tech/tags/database-design.md>), [database-schema](<https://devfeed.tech/tags/database-schema.md>), [delete](<https://devfeed.tech/tags/delete.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [failure](<https://devfeed.tech/tags/failure.md>), [fast](<https://devfeed.tech/tags/fast.md>), [foreign-keys](<https://devfeed.tech/tags/foreign-keys.md>), [identity](<https://devfeed.tech/tags/identity.md>), [index](<https://devfeed.tech/tags/index.md>), [locking](<https://devfeed.tech/tags/locking.md>), [outage](<https://devfeed.tech/tags/outage.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [risk](<https://devfeed.tech/tags/risk.md>), [schema](<https://devfeed.tech/tags/schema.md>)

### AI overview

Large cascading deletes can stall PostgreSQL writes: they hold RowExclusiveLock on involved tables while generating row, index, and WAL changes; a migration requesting AccessExclusiveLock can then block later queries. The excerpt recommends short migration lock_timeouts with retries, indexing foreign keys, and, for large customer deletions, soft-deleting first and reaping rows later in small batches. It also describes logical-replication pitfalls: subscriber-side cascades are skipped by default, so subscriber-only child rows may be orphaned; published delete cascades can fail if a child table lacks replica identity. Replication setups should account for the full foreign-key tree, with separate cleanup for subscriber-only children. The excerpt notes soft deletes require application reads to honor deleted_at, but allow controlled cleanup and possible restoration.

### Source excerpt

A one-line convenience in your database schema can become an outage. There are better ways to delete data that won't risk locking up your database.

## New in Symfony 8.2: Locking Controllers

DevFeed: [New in Symfony 8.2: Locking Controllers](<https://devfeed.tech/articles/new-in-symfony-8-2-locking-controllers-88398.md>)

Original publisher: [Read original article](<https://symfony.com/blog/new-in-symfony-8-2-locking-controllers>)

Author: Javier Eguiluz

Published: 2026-10-16T07:13:00Z

Content type: release

Language: en

Sources: [Symfony](<https://devfeed.tech/sources/symfony-blog.md>)

Topics: [locking](<https://devfeed.tech/topics/locking.md>), [Symfony](<https://devfeed.tech/topics/symfony.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [keys](<https://devfeed.tech/tags/keys.md>), [locking](<https://devfeed.tech/tags/locking.md>), [symfony](<https://devfeed.tech/tags/symfony.md>), [timeout](<https://devfeed.tech/tags/timeout.md>)

### AI overview

Symfony 8.2 adds a `#[Lock]` attribute that lets developers limit simultaneous controller requests by key, with options for shared or blocking locks, methods, and TTL. The article also explains lock acquisition and release behavior, placeholders, and injecting the acquired lock into a controller.

### Source excerpt

Some controllers must never run twice at the same time: importing a catalog, charging an order, or selling the last tickets of a conference. The Lock component solves this, but to use it in a controller, you have to inject a lock factory, build the key, acquire...

## ZDI-26-785: FreeBSD Kernel Shared Memory Time-Of-Check Time-Of-Use Local Privilege Escalation Vulnerability

DevFeed: [ZDI-26-785: FreeBSD Kernel Shared Memory Time-Of-Check Time-Of-Use Local Privilege Escalation Vulnerability](<https://devfeed.tech/articles/zdi-26-785-freebsd-kernel-shared-memory-time-of-check-time-of-use-local-privilege-escalation-vulnerability-91828.md>)

Original publisher: [Read original article](<http://www.zerodayinitiative.com/advisories/ZDI-26-785/>)

Published: 2026-10-16T05:00:00Z

Content type: news

Language: en

Sources: [Zero Day Initiative](<https://devfeed.tech/sources/zero-day-initiative.md>)

Topics: [freebsd](<https://devfeed.tech/topics/freebsd.md>), [Kernel](<https://devfeed.tech/topics/kernel.md>), [locking](<https://devfeed.tech/topics/locking.md>), [Exploit](<https://devfeed.tech/topics/exploit.md>)

Tags: [2026](<https://devfeed.tech/tags/2026.md>), [allows](<https://devfeed.tech/tags/allows.md>), [can](<https://devfeed.tech/tags/can.md>), [code](<https://devfeed.tech/tags/code.md>), [exploit](<https://devfeed.tech/tags/exploit.md>), [first](<https://devfeed.tech/tags/first.md>), [freebsd](<https://devfeed.tech/tags/freebsd.md>), [installations](<https://devfeed.tech/tags/installations.md>), [kernel](<https://devfeed.tech/tags/kernel.md>), [local](<https://devfeed.tech/tags/local.md>), [local-privilege-escalation](<https://devfeed.tech/tags/local-privilege-escalation.md>), [memory](<https://devfeed.tech/tags/memory.md>), [order](<https://devfeed.tech/tags/order.md>), [privilege-escalation](<https://devfeed.tech/tags/privilege-escalation.md>), [system](<https://devfeed.tech/tags/system.md>), [target](<https://devfeed.tech/tags/target.md>), [this](<https://devfeed.tech/tags/this.md>), [time](<https://devfeed.tech/tags/time.md>), [time-of-check-time-of-use](<https://devfeed.tech/tags/time-of-check-time-of-use.md>), [vulnerability](<https://devfeed.tech/tags/vulnerability.md>)

### AI overview

ZDI-26-785 (CVE-2026-58094) is a local privilege escalation flaw in the FreeBSD Kernel. Exploitation requires prior ability to run low-privileged code on the target. The flaw is in the FIOSSHMLPGCNF handler, where missing locking during operations on an object creates a time-of-check/time-of-use issue; an attacker can use it to execute arbitrary code in kernel context. FreeBSD has issued an update to correct the vulnerability. The ZDI assigned a CVSS rating of 7.8.

### Source excerpt

This vulnerability allows local attackers to escalate privileges on affected installations of FreeBSD Kernel. An attacker must first obtain the ability to execute low-privileged code on the target system in order to exploit this vulnerability. The ZDI has assigned a CVSS rating of 7.8. The following CVEs are assigned: CVE-2026-58094.

## How to Keep a File for Minutes, Not Years, on Cloud Run

DevFeed: [How to Keep a File for Minutes, Not Years, on Cloud Run](<https://devfeed.tech/articles/how-to-keep-a-file-for-minutes-not-years-on-cloud-run-86568.md>)

Original publisher: [Read original article](<https://www.freecodecamp.org/news/how-to-keep-a-file-for-minutes-not-years-on-cloud-run/>)

Author: Abhinay Gokul

Published: 2026-10-14T04:08:28Z

Content type: tutorial

Language: en

Sources: [Free Code Camp](<https://devfeed.tech/sources/freecodecamp-programming-tutorials-python-javascript-git-more.md>)

Topics: [Cloud Run](<https://devfeed.tech/topics/cloud-run.md>), [Google Cloud Platform (GCP)](<https://devfeed.tech/topics/google-cloud.md>), [locking](<https://devfeed.tech/topics/locking.md>)

Tags: [access-control](<https://devfeed.tech/tags/access-control.md>), [cloud-storage](<https://devfeed.tech/tags/cloud-storage.md>), [cloudcomputing](<https://devfeed.tech/tags/cloudcomputing.md>), [cybersecurity](<https://devfeed.tech/tags/cybersecurity.md>), [encryption](<https://devfeed.tech/tags/encryption.md>), [google-cloud](<https://devfeed.tech/tags/google-cloud.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [redis](<https://devfeed.tech/tags/redis.md>)

### AI overview

The tutorial describes a short-retention file workflow using one Cloud Run service, Cloud Storage, Cloud KMS, and Redis. It covers encrypted storage, expiring job records, authorized downloads, explicit deletion, and periodic cleanup coordinated with a Redis lock. It also explains why Redis failures should block new jobs and why short retention does not provide zero-knowledge privacy.

### Source excerpt

A print job, a one-time download, or a support attachment typically only needs to exist until someone finishes with it. But most backends still store it like Google Drive: a named object, no expiry, a

## How savepoints quietly throttled our Postgres queue

DevFeed: [How savepoints quietly throttled our Postgres queue](<https://devfeed.tech/articles/how-savepoints-quietly-throttled-our-postgres-queue-66833.md>)

Original publisher: [Read original article](<https://incident.io/blog/how-savepoints-quietly-throttled-our-postgres-queue>)

Author: Rory Malcolm

Published: 2026-10-06T20:35:15Z

Content type: article

Language: en

Sources: [The incident.io Blog](<https://devfeed.tech/sources/the-incident-io-blog.md>)

Topics: [database-optimization](<https://devfeed.tech/topics/database-optimization.md>), [performance-engineering](<https://devfeed.tech/topics/performance-engineering.md>), [queueing theory](<https://devfeed.tech/topics/queueing-theory.md>), [scalable-architecture](<https://devfeed.tech/topics/scalable-architecture.md>), [locking](<https://devfeed.tech/topics/locking.md>), [rate-limiting](<https://devfeed.tech/topics/rate-limiting.md>), [Deployment Strategies](<https://devfeed.tech/topics/deployment-strategies.md>)

Tags: [backpressure](<https://devfeed.tech/tags/backpressure.md>), [blocking](<https://devfeed.tech/tags/blocking.md>), [bottlenecks](<https://devfeed.tech/tags/bottlenecks.md>), [cache](<https://devfeed.tech/tags/cache.md>), [concurrent](<https://devfeed.tech/tags/concurrent.md>), [database](<https://devfeed.tech/tags/database.md>), [delay](<https://devfeed.tech/tags/delay.md>), [dispatcher](<https://devfeed.tech/tags/dispatcher.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [incident](<https://devfeed.tech/tags/incident.md>), [incident-channel](<https://devfeed.tech/tags/incident-channel.md>), [incident-management](<https://devfeed.tech/tags/incident-management.md>), [incident-response](<https://devfeed.tech/tags/incident-response.md>), [internals](<https://devfeed.tech/tags/internals.md>), [outage](<https://devfeed.tech/tags/outage.md>), [performance](<https://devfeed.tech/tags/performance.md>), [post-mortem](<https://devfeed.tech/tags/post-mortem.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [slack-incident](<https://devfeed.tech/tags/slack-incident.md>)

### AI overview

The incident.io team improved a Postgres-backed escalation queue by addressing tuple churn, MultiXact lock contention caused by per-tick savepoints, and repeated worker claim scans. They separated job claiming from processing, used a per-pod dispatcher with buffered worker channels, and tuned HOT updates and vacuuming. Load tests showed 3.5x peak escalation throughput, with a tradeoff of up to 10 seconds of delay if a process dies after claiming a job.

### Source excerpt

We 3.5x'd our peak capacity in one of the most performance critical systems we have; here's how we did it, featuring a journey through some Postgres internals.

## Optimistic vs pessimistic locking: choose by contention, not preference

DevFeed: [Optimistic vs pessimistic locking: choose by contention, not preference](<https://devfeed.tech/articles/optimistic-vs-pessimistic-locking-choose-by-contention-not-preference-64322.md>)

Original publisher: [Read original article](<https://ankit-rana.com/logs/62-optimistic-vs-pessimistic-locking/>)

Author: hello@ankit-rana.com

Published: 2026-10-03T00:00:00Z

Content type: article

Language: en

Sources: [Ankit Rana | Mechanical Sympathy](<https://devfeed.tech/sources/ankit-rana-mechanical-sympathy.md>)

Topics: [locking](<https://devfeed.tech/topics/locking.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Transactions](<https://devfeed.tech/topics/transactions.md>)

Tags: [concurrency](<https://devfeed.tech/tags/concurrency.md>), [database](<https://devfeed.tech/tags/database.md>), [jpa](<https://devfeed.tech/tags/jpa.md>), [locking](<https://devfeed.tech/tags/locking.md>), [optimistic-locking](<https://devfeed.tech/tags/optimistic-locking.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [transactions](<https://devfeed.tech/tags/transactions.md>)

### AI overview

The article compares optimistic and pessimistic database locking, explaining how contention, transaction duration, and retry behavior affect their tradeoffs. It also discusses atomic updates, sharding, and queueing as alternatives for highly contended operations, and recommends keeping transactions short around external calls.

### Source excerpt

Optimistic locking detects conflict at write time using a version column, so readers never block and the cost of a conflict is a wasted transaction plus a retry. Pessimistic locking prevents conflict by taking a lock up front, so work is never wasted and contending writers queue. The crossover is contention: below a few percent conflict rate optimistic wins clearly, above roughly ten percent the retry storm costs more than the queue would have. Both are wrong for a human editing a form, where the correct answer is to show the conflict rather than resolve it.

## Raspberry Pi's RAM lock was built to stop scalpers, but it's blocking repairs too

DevFeed: [Raspberry Pi's RAM lock was built to stop scalpers, but it's blocking repairs too](<https://devfeed.tech/articles/raspberry-pi-s-ram-lock-was-built-to-stop-scalpers-but-it-s-blocking-repairs-too-58685.md>)

Original publisher: [Read original article](<https://www.techspot.com/news/113953-raspberry-pi-blocks-ram-swaps-stop-resellers-selling.html>)

Author: Skye Jacobs

Published: 2026-09-23T14:54:00Z

Content type: news

Language: en

Sources: [TechSpot](<https://devfeed.tech/sources/techspot.md>)

Topics: [Raspberry Pi](<https://devfeed.tech/topics/raspberry-pi.md>), [Hardware](<https://devfeed.tech/topics/hardware.md>), [Embedded Software Dev](<https://devfeed.tech/topics/embedded-software-dev.md>), [locking](<https://devfeed.tech/topics/locking.md>), [upgrade](<https://devfeed.tech/topics/upgrade.md>)

Tags: [electronics](<https://devfeed.tech/tags/electronics.md>), [embedded](<https://devfeed.tech/tags/embedded.md>), [firmware](<https://devfeed.tech/tags/firmware.md>), [hardware](<https://devfeed.tech/tags/hardware.md>), [locking](<https://devfeed.tech/tags/locking.md>), [memory](<https://devfeed.tech/tags/memory.md>), [raspberry-pi](<https://devfeed.tech/tags/raspberry-pi.md>), [repair](<https://devfeed.tech/tags/repair.md>), [resellers](<https://devfeed.tech/tags/resellers.md>), [upgrade](<https://devfeed.tech/tags/upgrade.md>)

### AI overview

Raspberry Pi firmware locks boards to their original RAM configuration, preventing unofficial memory upgrades and potentially blocking repairs using equivalent replacement chips. The company says the restriction is intended to stop resellers from selling untested modified boards as factory configurations.

### Source excerpt

The issue came up on the Raspberry Pi forums after a user replaced the RAM on a Compute Module 5 but couldn't get the board to recognize the new 4 GB chip. PhilE, a Raspberry Pi engineer and forum moderator, said the company has been "locking devices to their original... Read Entire Article

## What IT Teams Get Wrong About Immutable Backups and Object Lock

DevFeed: [What IT Teams Get Wrong About Immutable Backups and Object Lock](<https://devfeed.tech/articles/what-it-teams-get-wrong-about-immutable-backups-and-object-lock-58050.md>)

Original publisher: [Read original article](<https://www.backblaze.com/blog/what-it-teams-get-wrong-about-immutable-backups-and-object-lock/>)

Author: Kari Wilson

Published: 2026-09-22T14:34:57Z

Content type: article

Language: en

Sources: [Backblaze](<https://devfeed.tech/sources/backblaze-blog-cloud-storage-cloud-backup.md>)

Topics: [backups](<https://devfeed.tech/topics/backups.md>), [locking](<https://devfeed.tech/topics/locking.md>), [ransomware](<https://devfeed.tech/topics/ransomware.md>), [Encryption](<https://devfeed.tech/topics/encryption.md>), [Cloud](<https://devfeed.tech/topics/cloud.md>), [Security](<https://devfeed.tech/topics/security.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [backing-up](<https://devfeed.tech/tags/backing-up.md>), [backup](<https://devfeed.tech/tags/backup.md>), [backups](<https://devfeed.tech/tags/backups.md>), [businessbackup](<https://devfeed.tech/tags/businessbackup.md>), [cloud](<https://devfeed.tech/tags/cloud.md>), [cloud-storage](<https://devfeed.tech/tags/cloud-storage.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [data-security](<https://devfeed.tech/tags/data-security.md>), [encryption](<https://devfeed.tech/tags/encryption.md>), [featured](<https://devfeed.tech/tags/featured.md>), [featured-backing-up](<https://devfeed.tech/tags/featured-backing-up.md>), [immutability](<https://devfeed.tech/tags/immutability.md>), [immutable-backup](<https://devfeed.tech/tags/immutable-backup.md>), [locking](<https://devfeed.tech/tags/locking.md>), [ransomware](<https://devfeed.tech/tags/ransomware.md>), [storage](<https://devfeed.tech/tags/storage.md>)

### AI overview

This article explains common mistakes in configuring immutable backups and object lock for cloud storage. It distinguishes encryption, which prevents unauthorized viewing, from object lock, which prevents modification and deletion, and explains how immutability affects restores and existing bucket contents.

### Source excerpt

Object lock can create false confidence when bucket settings, backup software, retention periods, and lifecycle rules are misaligned. Learn the most common immutable backup mistakes--and how to configure ransomware-resistant storage correctly without unexpected access, capacity, or operational transaction-cost surprises. The post What IT Teams Get Wrong About Immutable Backups and Object Lock appeared first on Backblaze Blog | Cloud Storage & Cloud Backup

## Deadlocks are a lock ordering bug, and lock ordering is a design decision

DevFeed: [Deadlocks are a lock ordering bug, and lock ordering is a design decision](<https://devfeed.tech/articles/deadlocks-are-a-lock-ordering-bug-and-lock-ordering-is-a-design-decision-55691.md>)

Original publisher: [Read original article](<https://ankit-rana.com/logs/56-deadlocks-are-a-lock-ordering-bug/>)

Author: hello@ankit-rana.com

Published: 2026-09-21T00:00:00Z

Content type: article

Language: en

Sources: [Ankit Rana | Mechanical Sympathy](<https://devfeed.tech/sources/ankit-rana-mechanical-sympathy.md>)

Topics: [Deadlock](<https://devfeed.tech/topics/deadlock.md>), [ordering](<https://devfeed.tech/topics/ordering.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Database](<https://devfeed.tech/topics/database.md>), [locking](<https://devfeed.tech/topics/locking.md>), [Sorting](<https://devfeed.tech/topics/sorting.md>), [Transactions](<https://devfeed.tech/topics/transactions.md>)

Tags: [concurrency](<https://devfeed.tech/tags/concurrency.md>), [database](<https://devfeed.tech/tags/database.md>), [deadlock](<https://devfeed.tech/tags/deadlock.md>), [deadlocks](<https://devfeed.tech/tags/deadlocks.md>), [java](<https://devfeed.tech/tags/java.md>), [locking](<https://devfeed.tech/tags/locking.md>), [ordering](<https://devfeed.tech/tags/ordering.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [sorting](<https://devfeed.tech/tags/sorting.md>), [transactions](<https://devfeed.tech/tags/transactions.md>)

### AI overview

The article explains how database deadlocks arise when concurrent transactions acquire the same locks in opposite orders. It recommends imposing a consistent global lock order, typically by sorting identifiers, to prevent circular wait in transfers and batch operations.

### Source excerpt

A deadlock needs four conditions and the only one you control is circular wait, which is why every deadlock reduces to two transactions acquiring the same locks in opposite orders. Imposing a global order on lock acquisition, usually by sorting the identifiers before touching any row, makes the cycle impossible to form. A database deadlock is the survivable version because the engine detects it and kills a victim, and an application level deadlock across two mutexes has no detector and simply hangs.

## Ensuring transaction-safety in Google App Engine

DevFeed: [Ensuring transaction-safety in Google App Engine](<https://devfeed.tech/articles/ensuring-transaction-safety-in-google-app-engine-27414.md>)

Original publisher: [Read original article](<http://engineering.khanacademy.org/posts/transaction-safety.htm>)

Author: Khan Academy

Published: 2016-06-27T22:00:00Z

Content type: article

Language: en

Sources: [Khan Academy](<https://devfeed.tech/sources/khan-academy.md>)

Topics: [Transactions](<https://devfeed.tech/topics/transactions.md>), [Database](<https://devfeed.tech/topics/database.md>), [locking](<https://devfeed.tech/topics/locking.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [appengine](<https://devfeed.tech/tags/appengine.md>), [cache](<https://devfeed.tech/tags/cache.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [cron](<https://devfeed.tech/tags/cron.md>), [data](<https://devfeed.tech/tags/data.md>), [database](<https://devfeed.tech/tags/database.md>), [database-corruption](<https://devfeed.tech/tags/database-corruption.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [decorators](<https://devfeed.tech/tags/decorators.md>), [documentation](<https://devfeed.tech/tags/documentation.md>), [efficiency](<https://devfeed.tech/tags/efficiency.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [error](<https://devfeed.tech/tags/error.md>), [errors](<https://devfeed.tech/tags/errors.md>), [google](<https://devfeed.tech/tags/google.md>), [infrastructure](<https://devfeed.tech/tags/infrastructure.md>), [news](<https://devfeed.tech/tags/news.md>), [safety](<https://devfeed.tech/tags/safety.md>), [transaction](<https://devfeed.tech/tags/transaction.md>), [transactions](<https://devfeed.tech/tags/transactions.md>)

### AI overview

Concurrent read-modify-write requests can overwrite each other's changes when the entity is fetched outside the transaction or user lock that protects its write. Khan Academy's App Engine infrastructure detects this and two related patterns--entirely unprotected updates and nested updates to the same entity--by tracking where entities were fetched and checking that context at put() time; it logs violations with tracebacks. To use it, developers annotate models with their write-safety method and wrap the WSGI app in TransactionSafetyMiddleware. The article also describes fetch_under_user_write_lock for re-fetching entities under a lock, and says the hooks cover both db and ndb. The checker does not detect stale reads, missing transactions that should group separate writes, conflicting puts of new entities with the same explicit key, or ordering races between requests.

### Source excerpt

By Craig Silverstein In last week's exciting post, I described an alternative to transactions that we use at ... Read more

## Optimizing a Spin-Lock

DevFeed: [Optimizing a Spin-Lock](<https://devfeed.tech/articles/optimizing-a-spin-lock-60979.md>)

Original publisher: [Read original article](<https://david.alvarezrosa.com/posts/optimizing-a-spin-lock/>)

Author: David Álvarez Rosa

Published: 2026-08-27T13:23:00Z

Content type: tutorial

Language: en

Sources: [David Álvarez Rosa](<https://devfeed.tech/sources/david-alvarez-rosa.md>)

Topics: [locking](<https://devfeed.tech/topics/locking.md>), [synchronization](<https://devfeed.tech/topics/synchronization.md>), [Cache](<https://devfeed.tech/topics/cache.md>), [queueing theory](<https://devfeed.tech/topics/queueing-theory.md>)

Tags: [atomic](<https://devfeed.tech/tags/atomic.md>), [cache](<https://devfeed.tech/tags/cache.md>), [cpp](<https://devfeed.tech/tags/cpp.md>), [energy](<https://devfeed.tech/tags/energy.md>), [exponential-backoff](<https://devfeed.tech/tags/exponential-backoff.md>), [perf](<https://devfeed.tech/tags/perf.md>), [performance](<https://devfeed.tech/tags/performance.md>), [thread](<https://devfeed.tech/tags/thread.md>), [threads](<https://devfeed.tech/tags/threads.md>)

### AI overview

This tutorial benchmarks a C++ spin-lock that protects a shared counter, then improves it through memory ordering, test-and-test-and-set, and exponential backoff. In the reported four-thread benchmark, the backoff version reduces latency from 246 ns to 43.0 ns and energy use from 64.92 J to 11.92 J compared with the naive version. The article recommends considering spin-locks only for threads pinned to dedicated cores and after measuring.

### Source excerpt

A spin-lock is a lock that never sleeps. Instead of yielding to the scheduler, the thread stays on the CPU and spins. No syscalls. No context switches. In this post, we'll build a version, step by step, that is 5.7x faster while drawing 5.4x less energy. Benchmark § Threads increment a shared counter under the lock.1 template <typename Lockable> auto BM_SpinLock(benchmark::State& state) -> void { alignas(std::hardware_destructive_interference_size) static auto lockable = Lockable{}; alignas(std::hardware_destructive_interference_size) static auto counter = std::uint64_t{}; pinThread(state.thread_index()); for (auto _ : state) { lockable.lock(); ++counter; lockable.unlock(); } benchmark::DoNotOptimize(counter); } The lock and the counter get a cache line each. Threads are pinned. A naive spin-lock § An atomic bool and an exchange loop.2 class SpinLockV1 { std::atomic_bool locked_{false}; public: auto lock() noexcept -> void { while (locked_.exchange(true)); } auto unlock() noexcept -> void { locked_.store(false); } }; Uncontended it takes 3.14 ns. Two threads take 61.5 ns, twenty times as long. Four take 246 ns. $ ./benchmark --benchmark_filter='V1>' BM_SpinLock<SpinLockV1>/real_time/threads:1 3.14 ns BM_SpinLock<SpinLockV1>/real_time/threads:2 61.5 ns BM_SpinLock<SpinLockV1>/real_time/threads:4 246 ns A core must own the line exclusively to write it, so waiters take it from each other. L1-d misses go from 1.27% at one thread to 61.73% at four, and one branch in eight is mispredicted.3 $ perf stat -d ./benchmark --benchmark_filter='V1>.*threads:1' 1,638,619,370 instructions # 0.51 insn per cycle 244,253 branch-misses # 0.11% of all branches 75,519 L1-dcache-load-misses # 1.27% of all L1-dcache accesses $ perf stat -d ./benchmark --benchmark_filter='V1>.*threads:4' 1,231,495,723 instructions # 0.02 insn per cycle 33,824,516 branch-misses # 12.52% of all branches 208,756,315 L1-dcache-load-misses # 61.73% of all L1-dcache accesses Spinning costs energy.4 At four thread

## Decoding isolation levels: I built a toy DB to force dirty reads and phantom reads

DevFeed: [Decoding isolation levels: I built a toy DB to force dirty reads and phantom reads](<https://devfeed.tech/articles/decoding-isolation-levels-i-built-a-toy-db-to-force-dirty-reads-and-phantom-reads-39587.md>)

Original publisher: [Read original article](<https://ankit-rana.com/logs/35-isolation-levels-toy-db-dirty-phantom-reads/>)

Author: hello@ankit-rana.com

Published: 2026-08-02T00:00:00Z

Content type: tutorial

Language: en

Sources: [Ankit Rana | Mechanical Sympathy](<https://devfeed.tech/sources/ankit-rana-mechanical-sympathy.md>)

Topics: [Database](<https://devfeed.tech/topics/database.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Python](<https://devfeed.tech/topics/python.md>), [MySQL](<https://devfeed.tech/topics/mysql.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [locking](<https://devfeed.tech/topics/locking.md>)

Tags: [concurrency](<https://devfeed.tech/tags/concurrency.md>), [databases](<https://devfeed.tech/tags/databases.md>), [isolation-levels](<https://devfeed.tech/tags/isolation-levels.md>), [locking](<https://devfeed.tech/tags/locking.md>), [mvcc](<https://devfeed.tech/tags/mvcc.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [python](<https://devfeed.tech/tags/python.md>), [sql](<https://devfeed.tech/tags/sql.md>), [transactions](<https://devfeed.tech/tags/transactions.md>)

### AI overview

A hands-on tutorial uses a roughly 200-line Python toy database to reproduce transaction anomalies and explain why isolation levels behave differently across PostgreSQL and MySQL InnoDB. It shows that the ANSI SQL isolation table does not fully describe engine behavior, including PostgreSQL's handling of READ UNCOMMITTED and REPEATABLE READ, and MySQL InnoDB's snapshot and next-key locking behavior.

### Source excerpt

The ANSI isolation table lists which anomalies each level permits, but it does not describe what your engine actually does: Postgres silently upgrades READ UNCOMMITTED to READ COMMITTED, and its REPEATABLE READ prevents phantoms that the standard allows. Phantom reads are a locking problem rather than a row problem, because you cannot lock a row that does not exist yet. Snapshot isolation stops every anomaly the table names and still permits write skew, which the table never mentions.

## Build a Postgres Job Queue with SKIP LOCKED, No Redis

DevFeed: [Build a Postgres Job Queue with SKIP LOCKED, No Redis](<https://devfeed.tech/articles/build-a-postgres-job-queue-with-skip-locked-no-redis-47824.md>)

Original publisher: [Read original article](<https://www.prisma.io/blog/you-dont-need-a-job-queue-postgres-already-has-skip-locked>)

Author: Nurul Sundarani

Published: 2026-07-17T00:00:00Z

Content type: tutorial

Language: en

Sources: [Prisma](<https://devfeed.tech/sources/prisma-blog.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [locking](<https://devfeed.tech/topics/locking.md>), [Database](<https://devfeed.tech/topics/database.md>), [Transactions](<https://devfeed.tech/topics/transactions.md>), [Redis](<https://devfeed.tech/topics/redis.md>)

Tags: [background](<https://devfeed.tech/tags/background.md>), [concurrent](<https://devfeed.tech/tags/concurrent.md>), [database](<https://devfeed.tech/tags/database.md>), [for-update](<https://devfeed.tech/tags/for-update.md>), [locking](<https://devfeed.tech/tags/locking.md>), [locks](<https://devfeed.tech/tags/locks.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [retries](<https://devfeed.tech/tags/retries.md>), [worker](<https://devfeed.tech/tags/worker.md>)

### AI overview

A tutorial showing how to build a reliable background job queue in PostgreSQL using FOR UPDATE SKIP LOCKED, retries, and concurrent workers. It explains how keeping jobs in the same database can avoid the operational and transactional complexity of adding a separate broker such as Redis.

### Source excerpt

Postgres can run a reliable background job queue with FOR UPDATE SKIP LOCKED. Build a worker queue with retries using pg and Prisma Postgres, no broker required.

## Coordinate access to shared resources with a distributed lock built on Temporal Workflows

DevFeed: [Coordinate access to shared resources with a distributed lock built on Temporal Workflows](<https://devfeed.tech/articles/coordinate-access-to-shared-resources-with-a-distributed-lock-built-on-temporal-workflows-35762.md>)

Original publisher: [Read original article](<https://temporal.io/blog/coordinate-access-to-shared-resources-with-a-distributed-lock-built-on-temporal-workflows>)

Author: Keith Tenzer

Published: 2026-06-11T00:00:00Z

Content type: tutorial

Language: en

Sources: [Temporal](<https://devfeed.tech/sources/temporal-blog.md>)

Topics: [locking](<https://devfeed.tech/topics/locking.md>)

Tags: [distributed](<https://devfeed.tech/tags/distributed.md>), [lease](<https://devfeed.tech/tags/lease.md>), [locking](<https://devfeed.tech/tags/locking.md>), [locks](<https://devfeed.tech/tags/locks.md>), [recovery](<https://devfeed.tech/tags/recovery.md>), [resource](<https://devfeed.tech/tags/resource.md>), [temporal-concepts](<https://devfeed.tech/tags/temporal-concepts.md>), [workflows](<https://devfeed.tech/tags/workflows.md>)

### AI overview

This guide describes a reusable, durable distributed lock for Temporal Workflows. It models each permit as a short-lived child Workflow, uses Workflow IDs for atomic acquisition, and uses Signals and lease timeouts to release locks and recover orphaned permits.

### Source excerpt

This guide details a reusable, durable distributed lock for Temporal Workflows that doesn't rely on an external database, central limiter, or any shared state.

## Track customer loyalty points with durable workflows

DevFeed: [Track customer loyalty points with durable workflows](<https://devfeed.tech/articles/track-customer-loyalty-points-with-durable-workflows-35824.md>)

Original publisher: [Read original article](<https://temporal.io/blog/entity-workflow-loyalty-points>)

Author: Cecil Phillip

Published: 2026-06-03T00:00:00Z

Content type: tutorial

Language: en

Sources: [Temporal](<https://devfeed.tech/sources/temporal-blog.md>)

Topics: [account](<https://devfeed.tech/topics/account.md>), [business logic](<https://devfeed.tech/topics/business-logic.md>), [Database](<https://devfeed.tech/topics/database.md>), [real-time](<https://devfeed.tech/topics/real-time.md>), [locking](<https://devfeed.tech/topics/locking.md>), [retry](<https://devfeed.tech/topics/retry.md>), [service](<https://devfeed.tech/topics/service.md>), [upgrade](<https://devfeed.tech/topics/upgrade.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>)

Tags: [account](<https://devfeed.tech/tags/account.md>), [business-logic](<https://devfeed.tech/tags/business-logic.md>), [customer](<https://devfeed.tech/tags/customer.md>), [database](<https://devfeed.tech/tags/database.md>), [locking](<https://devfeed.tech/tags/locking.md>), [loyalty](<https://devfeed.tech/tags/loyalty.md>), [loyalty-points](<https://devfeed.tech/tags/loyalty-points.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [process](<https://devfeed.tech/tags/process.md>), [query](<https://devfeed.tech/tags/query.md>), [real-time](<https://devfeed.tech/tags/real-time.md>), [retry](<https://devfeed.tech/tags/retry.md>), [service](<https://devfeed.tech/tags/service.md>), [temporal](<https://devfeed.tech/tags/temporal.md>), [temporal-concepts](<https://devfeed.tech/tags/temporal-concepts.md>), [upgrades](<https://devfeed.tech/tags/upgrades.md>), [workflows](<https://devfeed.tech/tags/workflows.md>)

### AI overview

This article explains how to track customer loyalty points with durable Entity Workflows in Temporal. Each customer has a persistent workflow that maintains points, tier status, and activity history, while Signals handle accruals, Updates validate redemptions, and Queries read current balances.

### Source excerpt

Track loyalty points with durable Entity Workflows in Temporal. See how to handle accruals, tier upgrades, and redemptions for each customer.

## Understanding std::shared\_mutex from C++17

DevFeed: [Understanding std::shared\_mutex from C++17](<https://devfeed.tech/articles/understanding-std-shared-mutex-from-c-17-53320.md>)

Original publisher: [Read original article](<https://www.cppstories.com/2026/shared_mutex/>)

Published: 2026-02-14T00:00:00Z

Content type: tutorial

Language: en

Sources: [C++ Stories](<https://devfeed.tech/sources/c-stories.md>)

Topics: [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [locking](<https://devfeed.tech/topics/locking.md>), [Code](<https://devfeed.tech/topics/code.md>), [Scalability](<https://devfeed.tech/topics/scalability.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [code](<https://devfeed.tech/tags/code.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [mutex](<https://devfeed.tech/tags/mutex.md>), [parallelism](<https://devfeed.tech/tags/parallelism.md>), [scalability](<https://devfeed.tech/tags/scalability.md>)

### AI overview

A practical C++ tutorial explaining how std::shared_mutex differs from std::mutex. It uses a thread-safe counter to show how shared ownership allows multiple concurrent readers while exclusive ownership protects writes, improving scalability for read-mostly data.

### Source excerpt

In this article, we'll start with a basic example using std::mutex, look at its limitations, and then introduce std::shared_mutex, a reader-writer mutex added in C++17. Even in 2026, with many new concurrency features available, std::shared_mutex is still a valuable and practical tool. Let's jump in. A Simple Thread-Safe Counter with std::mutex We'll begin with a small example (a standard "hello world" for this type of mutexes): a counter object that multiple threads can access: #include <mutex> class Counter { public: int get() const { std::lock_guard<std::mutex> lock(mutex_); return value_; } void increment() { std::lock_guard<std::mutex> lock(mutex_); ++value_; } private: mutable std::mutex mutex_; int value_{0}; }; Nothing scary so far, and this implementation is correct, thread-safe, and easy to understand. However, there's a significant limitation: All access is exclusive. Only one thread can call get() or increment() at any given time, even though get() does not modify the state. When std::mutex Becomes a Bottleneck In many real-world programs, shared data is read frequently and might be rarely updated/overriden. For example: configuration data caches lookup tables statistics and metrics With std::mutex, even multiple read-only operations block each other. This limits scalability and wastes available parallelism. Have a look at the following example: int main() { Counter counter; std::vector<std::jthread> threads; threads.emplace_back([&counter] { for (int i = 0; i < 10; ++i) { counter.increment(); std::this_thread::sleep_for(15ms); } }); for (int i = 0; i < 4; ++i) { threads.emplace_back([&counter, i] { for (int j = 0; j < 10; ++j) { std::println("reader {} sees {}", i, counter.get()); std::this_thread::sleep_for(10ms); } }); } } On Compiler Explorer - see here https://godbolt.org/z/cdjrj8hGd - I'm getting the following output: Program returned: 0 reader 0 sees 0 reader 1 sees 1 reader 2 sees 1 reader 3 sees 1 reader 0 sees 1 reader 1 sees 1 reader 2 sees 1

[Next page](<https://devfeed.tech/topics/locking.md?cursor=WyIyMDI2LTAyLTE0VDAwOjAwOjAwKzAwOjAwIiwgImFlNzhjMGUxLTBhYWUtNDA1Yy1hMTJjLTUwZWUwN2M1M2I5MSJd>)