# New extension: Optimistic Locking (Redis)

**URL:** <https://forum.codecrafters.io/t/new-extension-optimistic-locking-redis/16015>\
**Category:** Announcements\
**Tags:** challenge:redis\
**Created:** [April 8, 2026, 10:57am UTC](https://forum.codecrafters.io/t/new-extension-optimistic-locking-redis/16015 "2026-04-08T10:57:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [April 8, 2026, 10:57am UTC](https://forum.codecrafters.io/t/new-extension-optimistic-locking-redis/16015/1 "2026-04-08T10:57:04Z")

</div>

Hey everyone!

The next extension for the Redis challenge is now live: **Optimistic Locking**.

Optimistic Locking lets your Redis server handle concurrent updates safely by ensuring a transaction only succeeds if the data hasn’t changed after being watched.

 ![image](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/0/4/041bd789337bbfe758ccccee68442523cce25f8f.jpeg)

By the end of this extension, your Redis implementation will support:

- Monitoring keys for changes using `WATCH`
- Aborting transactions if watched keys change before `EXEC`
- Watching multiple keys at once
- Handling missing keys correctly
- Clearing watches with `UNWATCH`
- Automatically unwatching on `EXEC` and `DISCARD`

Here’s the stage breakdown:

 ![image](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/a/c/acded9bb320246a932b3afd58835ee9141fff5ee.png)

Please [give this a try](https://app.codecrafters.io/courses/redis/overview) and let us know how it can be improved! @UdeshyaDhungana (author of this extension) and I will be available here to help out with any tester or instruction-related issues.
