Visitar URL original
feat(java): add delete_segments to partitions client by AmalenduManoj · Pull Request #4381 · apache/iggy · GitHub
Skip to content

feat(java): add delete_segments to partitions client - #4381

Open
AmalenduManoj wants to merge 5 commits into
apache:masterfrom
AmalenduManoj:feat/java-delete-segments-partitions
Open

AmalenduManoj wants to merge 5 commits into
apache:masterfrom
AmalenduManoj:feat/java-delete-segments-partitions

Conversation

@AmalenduManoj

@AmalenduManoj AmalenduManoj commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

What Changed

Adds deleteSegments to the Java SDK's partitions clients across all transports: the async interface and its TCP client (new CommandCode.Segment.DELETE = 503 payload framed as stream id, topic id, partition_id LE int, segments_count LE int), the blocking interface, its TCP delegate (thin wrapper over the async client via FutureUtil.resolve), and the blocking HTTP client (DELETE /streams/{id}/topics/{id}/partitions/{id}?segments_count=N). A new PartitionsClientBaseTest case covers the blocking client end to end.

The HTTP layer needs no changes beyond the client mapping since the server already exposes the segments-delete route; Fetch and other partition mutation paths that share this client are untouched.

Closes #4369

Local Execution

Passed
Pre-commit hooks ran

AI Usage

If AI tools were used, please answer:

Which tools? Codex
Scope of usage? Implementation
How did you verify the generated code works correctly? Manual verification, testing
Can you explain every line of the code if asked? Yes

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

Thanks for the PR. It is labeled S-waiting-on-review and queued for review.

Slash commands (own line, regular comment) move it around the queue:

  • /ready - back to S-waiting-on-review after addressing feedback
  • /author - flip to S-waiting-on-author while you finish changes
  • /request-review @user-or-team - request a reviewer
  • /pin - exempt the PR from the stale bot, /unpin to undo

See CONTRIBUTING.md for details.

@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Oct 2, 2026
@codecov

codecov Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.00000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.84%. Comparing base (2d7fddb) to head (060b153).

Files with missing lines Patch % Lines
...che/iggy/client/async/tcp/PartitionsTcpClient.java 60.00% 2 Missing and 2 partials ⚠️
.../apache/iggy/client/blocking/PartitionsClient.java 0.00% 2 Missing ⚠️
...org/apache/iggy/client/async/PartitionsClient.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #4381      +/-   ##
============================================
- Coverage     87.96%   87.84%   -0.12%     
- Complexity     1579     1584       +5     
============================================
  Files          1290     1290              
  Lines        230145   228472    -1673     
  Branches     193480   191809    -1671     
============================================
- Hits         202440   200697    -1743     
- Misses        22980    23057      +77     
+ Partials       4725     4718       -7     
Components Coverage Δ
Rust Core 88.94% <ø> (-0.13%) ⬇️
Java SDK 68.80% <72.00%> (+0.06%) ⬆️
C# SDK 77.44% <ø> (-0.18%) ⬇️
Python SDK 91.24% <ø> (ø)
PHP SDK 85.67% <ø> (ø)
Node SDK 96.51% <ø> (-0.09%) ⬇️
Go SDK 70.33% <ø> (+0.13%) ⬆️
Files with missing lines Coverage Δ
...ggy/client/blocking/http/PartitionsHttpClient.java 100.00% <100.00%> (ø)
.../iggy/client/blocking/tcp/PartitionsTcpClient.java 100.00% <100.00%> (ø)
...c/main/java/org/apache/iggy/serde/CommandCode.java 100.00% <100.00%> (ø)
...org/apache/iggy/client/async/PartitionsClient.java 0.00% <0.00%> (ø)
.../apache/iggy/client/blocking/PartitionsClient.java 0.00% <0.00%> (ø)
...che/iggy/client/async/tcp/PartitionsTcpClient.java 87.87% <60.00%> (-12.13%) ⬇️

... and 56 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@apache apache deleted a comment from github-actions Bot Oct 2, 2026
@hubcio

hubcio commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

/skill team-review-slim

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary: The Java SDK adds deleteSegments to the async and blocking partitions clients, and the wire payload, command code 503, and HTTP route all match the server. The review found a 32-bit truncation of the segment count on the TCP path, a test that reads the segment count before the asynchronous trim lands, and minor API, documentation, style, and simplification items.

Counts: critical 0, warning 2, nit 3, simplification 1


This review was generated by Claude Code 2.1.284 on deepseek-flash[1m]. Review the output before you act on it.

@github-actions github-actions Bot added S-waiting-on-author PR is waiting on author response and removed S-waiting-on-review PR is waiting on a reviewer labels Oct 2, 2026

@hubcio hubcio left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the segmentsCount truncation and the test that races the trim both need fixing before this can go in. the description also needs a pass - it ends with a leftover "want me to fill in the issue numbers?" and mentions fetch paths this client doesn't have.

please keep your AI usage in check

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown

/skill is limited to repository committers, and AmalenduManoj does not have write access.

@AmalenduManoj
AmalenduManoj requested a review from hubcio October 3, 2026 10:19

This branch has not been deployed

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

Labels

S-waiting-on-author PR is waiting on author response

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Java SDK: expose deleteSegments

2 participants