Java SDK: expose deleteSegments
Maintainers usually reply within 2 days
@AmalenduManoj is already working on this.
Since Oct 2, 2026.
- #4381 by @AmalenduManoj — closed without merging
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 75/100
Research direction
Start with serde/CommandCode.java, VsrOperation.java, the blocking and async PartitionsClient interfaces, and the TCP and HTTP client files listed in the issue; compare their existing deletePartitions implementations. Check the payload format in core/binary_protocol/src/requests/segments/delete_segments.rs, then add the case to PartitionsClientBaseTest.java. Done means the new test passes for both TCP and HTTP clients.
Written by the indexing model from the issue text.
Description
The Rust client has SegmentClient::delete_segments (core/common/src/traits/segment_client.rs). The Java SDK has no method for it.
What to do
- Add a
Segmentenum withDELETE(503)toserde/CommandCode.java. The VSR operation is already mapped inVsrOperation.java. - Add
deleteSegments(StreamId streamId, TopicId topicId, Long partitionId, Long segmentsCount)to the blocking and asyncPartitionsClientinterfaces, next todeletePartitions. - Implement it in the TCP clients (
client/async/tcp/PartitionsTcpClient.java,client/blocking/tcp/PartitionsTcpClient.java), followingdeletePartitions. The payload is the stream identifier, the topic identifier, then the partition ID and the segments count as little-endianu32values (core/binary_protocol/src/requests/segments/delete_segments.rs). - Implement it in the HTTP client (
client/blocking/http/PartitionsHttpClient.java):DELETE /streams/{stream_id}/topics/{topic_id}/partitions/{partition_id}with asegments_countquery parameter. - Add a test to
PartitionsClientBaseTest.java. The base test runs for both TCP and HTTP.
Done when
The new test passes for both the TCP and HTTP clients.
- Dominant language
- Rust
- Stars
- 5.3k
- Forks
- 548
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 194
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/iggy
-
go good first issue test
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 2 days
-
go good first issue test
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 2 days
-
go good first issue test
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 2 days
-
good first issue java test
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 2 days
-
good first issue javascript test
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 2 days
Similar issues
-
marketing
Difficulty 2/5 Half a day Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
S: Untriaged T: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
libnyanpasu/clash-nyanpasu#6537 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 Under an hour Newbie friendliness 62/100
tauri-apps/tao#1445 ·
Maintainers usually reply within 1 day
-
bug P3
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
nearai/compose-manager#95 ·
Maintainers usually reply within 1 day