Java SDK: expose deleteSegments

Abierto
#4,369 2 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 2 días

@AmalenduManoj ya está trabajando en esto.

Desde el 2/10/2026.

  • #4381 de @AmalenduManoj — cerrado sin fusionar

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
75/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
java, rust

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

good first issue java

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 Segment enum with DELETE(503) to serde/CommandCode.java. The VSR operation is already mapped in VsrOperation.java.
  • Add deleteSegments(StreamId streamId, TopicId topicId, Long partitionId, Long segmentsCount) to the blocking and async PartitionsClient interfaces, next to deletePartitions.
  • Implement it in the TCP clients (client/async/tcp/PartitionsTcpClient.java, client/blocking/tcp/PartitionsTcpClient.java), following deletePartitions. The payload is the stream identifier, the topic identifier, then the partition ID and the segments count as little-endian u32 values (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 a segments_count query 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.

Lenguaje dominante
Rust
Estrellas
5.3k
Forks
548
Merge medio
2 d 20 h
PR fusionados (30 d)
194

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/iggy

Todos los issues de apache/iggy

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.