feat(go): add stream/topic purge API with BDD tests and fix server purge bug#3608
feat(go): add stream/topic purge API with BDD tests and fix server purge bug#3608chengxilo wants to merge 7 commits into
Conversation
|
Thanks for the PR. It is labeled Slash commands (own line, regular comment) move it around the queue:
See CONTRIBUTING.md for details. |
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #3608 +/- ##
=============================================
- Coverage 73.61% 41.70% -31.92%
Complexity 937 937
=============================================
Files 1297 1294 -3
Lines 143770 125001 -18769
Branches 119328 100620 -18708
=============================================
- Hits 105842 52130 -53712
- Misses 34562 70050 +35488
+ Partials 3366 2821 -545
🚀 New features to boost your workflow:
|
|
@chengxilo i'll check this during the weekend. could you please rebase? |
|
I've checked whether there is potential concurrency issue due to interleaving of flush + purge commands as this is what I've reckon from the changes could potentially be an issue and did not find any problems with that. Let's wait for @hubcio review and we can merge it. |
8bc60d8 to
f5d74d9
Compare
|
/ready |
|
nothing has been changed, just because I rebased onto master locally so it was forced pushed() I shouldn't do that tho. |
Which issue does this PR address?
Relates to #2148
Rationale
Go SDK doesn't have the purge topic/ purge stream API, so this PR implement them. To test it, I added an new BDD test scenario, and implemented both Go and Rust BDD tests.
What changed?
The Go SDK was missing PurgeStream and PurgeTopic methods. Added them along with a shared BDD scenario (stream_topic_purge.feature) and implementations in both Go and Rust.
While testing, discovered that purge_all_segments only cleared on-disk segments but left stale messages in the journal and in-flight tiers. Polling after purge would return messages that should have been deleted. Fixed by calling
journal.reset()andclear_in_flight()during partition re-initialization. I am not famliar with Rust server code so during the code review this part worth more attentionLocal Execution
AI Usage