Skip to content

[1015] Implement Distributed Locking for Indexer and Replay Jobs - #1054

Merged
Devsol-01 merged 2 commits into
Devsol-01:mainfrom
Goodnessukaigwe:fix/1015-implement-distributed-locking-for-indexer-and-replay-jobs
Jun 29, 2026
Merged

[1015] Implement Distributed Locking for Indexer and Replay Jobs#1054
Devsol-01 merged 2 commits into
Devsol-01:mainfrom
Goodnessukaigwe:fix/1015-implement-distributed-locking-for-indexer-and-replay-jobs

Conversation

@Goodnessukaigwe

Copy link
Copy Markdown
Contributor

Summary

  • Adds Redis-backed DistributedLockService with in-memory fallback, lease renewal, and ownership-aware release.
  • Integrates per-stream locks for savings indexer cycles and claims event listener polling.

Distributed locking strategy

  • Lock keys: indexer:stream:{streamId} and indexer:stream:claims:{contractId}.
  • Uses SET NX PX semantics with automatic lease renewal.
  • Graceful skip when lock acquisition fails (no duplicate processing).

Merge note

Depends on #1013 being merged first. Rebase onto main after #1013 lands to minimize diff noise.

Closes #1015

Made with Cursor

Goodnessukaigwe and others added 2 commits June 28, 2026 23:33
Persist ledger and event cursor checkpoints transactionally, verify
checksum integrity on resume, and deduplicate processed events to support
safe crash recovery without duplicate execution.

Co-authored-by: Cursor <cursoragent@cursor.com>
Extend claims event listener polling with per-stream Redis/in-memory locks
so horizontally scaled instances do not duplicate Soroban event processing.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jun 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
nestera Skipped Skipped Jun 28, 2026 10:38pm

@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@Goodnessukaigwe Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Devsol-01
Devsol-01 merged commit cd1e2d8 into Devsol-01:main Jun 29, 2026
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Backend] -- Implement Distributed Locking for Indexer and Replay Jobs

2 participants