Skip to content

Conversation

@jfbus
Copy link
Contributor

@jfbus jfbus commented Dec 11, 2025

Description

This PR refactors the batcher to:

  • allow simultaneous requests for the same id in the ByID batcher (the former version deadlocked)
  • return ErrNotFound in ByID if id was not found
  • adds a SameQuery batcher, batching all ReadXRequest that are equal (as defined by reflect.DeepEqual).

Type of Change

Please check the relevant option(s):

  • 🐛 Bug fix
  • ✨ New feature
  • 🧹 Code cleanup or refactor
  • 📝 Documentation update
  • 🔧 Build or CI-related change
  • 🔒 Security fix
  • Other (specify):

How Has This Been Tested?

Please describe the test strategy:

  • Manual testing
  • Unit tests
  • Integration tests
  • Not tested yet

Checklist

  • I have followed the Contributing Guidelines
  • I have added tests or explained why they are not needed
  • I have updated relevant documentation (README, examples, etc.)
  • My changes follow the Conventional Commits specification
  • My commits include appropriate Gitmoji

Additional Context

@jfbus jfbus merged commit a1dac91 into main Dec 12, 2025
4 checks passed
@jfbus jfbus deleted the batcher_multi branch December 12, 2025 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants