Skip to content

[GSSoC'26] fix: rename l1_lock dict to l1_cache to prevent variable overwrite#2015

Merged
dipexplorer merged 1 commit into
RatLoopz:mainfrom
vipul674:fix/l1-lock-variable-overwrite
Jun 17, 2026
Merged

[GSSoC'26] fix: rename l1_lock dict to l1_cache to prevent variable overwrite#2015
dipexplorer merged 1 commit into
RatLoopz:mainfrom
vipul674:fix/l1-lock-variable-overwrite

Conversation

@vipul674

Copy link
Copy Markdown
Contributor

🛑 STOP: Assignment & File Scope Check

  • I am assigned to this issue.
  • I verified that this PR ONLY touches the required files.

📋 PR Summary & Link

🏷️ PR Type

  • 🐛 type: bug

✅ Checklist

  • My PR has a linked issue (Closes #2008)
  • I have pulled the latest main and resolved any conflicts

self.l1_lock was declared as a Dict but immediately overwritten with
threading.RLock(), causing all dict operations (key lookup, assignment,
deletion, length check) to crash with TypeError. Renamed the dict to
self.l1_cache while keeping self.l1_lock as the RLock.

Closes RatLoopz#2008
@vipul674

Copy link
Copy Markdown
Contributor Author

@RatLoopz PR ready for review.

Changes:

  • src/services/distributed_lock_manager.py: Renamed self.l1_lock dict to self.l1_cache to prevent the variable from being overwritten by threading.RLock().

Note: Issues #2009 and #2010 appear to be already fixed in the current codebase (no stack trace leak in reports.ts, no interactions/check route found).

Testing:

  • Verified get(), put(), invalidate(), get_stats() now work correctly with separate cache dict and lock.

Closes #2008

@github-actions github-actions Bot added the gssoc:approved Approved for gssoc label Jun 17, 2026
@dipexplorer dipexplorer added level:beginner 20 pts quality:clean multiplier x1.2 type:bug Something isn't working labels Jun 17, 2026
@dipexplorer dipexplorer merged commit 14fca5e into RatLoopz:main Jun 17, 2026
20 of 22 checks passed
@github-project-automation github-project-automation Bot moved this from 📥 Backlog to 🎉 Merged in SahiDawa Workflow Jun 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Congratulations @vipul674! Your Pull Request "[GSSoC'26] fix: rename l1_lock dict to l1_cache to prevent variable overwrite" has been successfully merged by @dipexplorer.

Thank you for your valuable contribution to SahiDawa! 🇮🇳
If this was for GSSoC 2026, your work is officially merged and valid. Keep up the great work and feel free to claim other open issues. 🚀

Follow us on LinkedIn: https://www.linkedin.com/company/ratloopz/ to get shoutout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved Approved for gssoc level:beginner 20 pts quality:clean multiplier x1.2 type:bug Something isn't working

Projects

Status: 🎉 Merged

Development

Successfully merging this pull request may close these issues.

[Bug]: MultiTierLockManager: self.l1_lock dict variable overwritten by threading.RLock() — all get/put/invalidate calls crash with TypeError

2 participants