Repository navigation
chore: Move locks into batcher subclasses - #8325
alexander-alderman-webb wants to merge 5 commits into
Conversation
Coverage Results 📊✅ 59457 passed | ⏭️ 3119 skipped | Total: 62576 | Pass Rate: 95.02% | Execution Time: 157m 36s 📊 Comparison with Base Branch
✨ Test counts unchanged from base. All tests are passing successfully. ✅ Patch coverage is 82.03% (105 of 128 changed executable lines covered; target 80%). Changed files with executable lines (4)
Coverage diff@@ Coverage Diff @@
## master #8325 +/-##
==========================================
+ Coverage 90.11% 90.13% +0.02%
==========================================
Files 201 201 —
Tracked lines 22199 22264 +65
Branches 7784 7796 +12
==========================================
+ Hits 20004 20067 +63
- Misses 2195 2197 +2
- Partials 1283 1290 +7Generated by Coverage Action |
sentrivana
left a comment
There was a problem hiding this comment.
I didn't check line-by-line but I assume there are no actual changes in the code, it was just moved? If that's not the case lmk and I'll take a closer look
| with capture_internal_exceptions(): | ||
| self._flush() | ||
|
|
||
| def add(self, item: "T") -> None: |
There was a problem hiding this comment.
Would be good to leave a stub for add() here so that the base class advertises it as part of the batcher "protocol"
|
Yes the code was just copied into the subclasses, there shouldn't be any behavior change. |
|
Why do this in the first place? 👀 I just had a look at the other PRs. I'd thought you wanted to use the new base class in them, but it looks like the new metrics batcher doesn't inherit from |
|
Good shout, I did it without inheritance at first to make iterating easier, and forgot to wire the superclass in 😞. |
PR risk: mediumFor commit Main concerns: reach, host performance, data sent to Sentry. This label is a hint for reviewers, not an approval. |
Move everything that relies on
Batcher._lockinto subclasses to enable writing a lock-free metrics batcher.