Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

`Transport::flush` on an `Arc<T>` transport returns `true` without flushing `T`

Abierto Apto para principiantes
#1,374 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@sentry-junior ya está trabajando en esto.

Desde el 29/10/2026.

  • #1390 de @sentry-junior — abierto

Evaluación

Dificultad
1/5
Tiempo estimado
Menos de una hora
Aptitud para principiantes
85/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
rust
Área
backend

Línea de trabajo

Lee sentry-core/src/transport/mod.rs, especialmente la implementación de Transport para Arc<T> y el flush predeterminado del trait. Confirma el comportamiento con la reproducción del issue, donde NeverDrains::flush devuelve false. La tarea está completa cuando hacer flush a través de Arc<T> devuelve el resultado del transporte envuelto; revisa también las pruebas de transports cercanos, si las hay.

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

Descripción

Bug Rust
How do you use Sentry?

Sentry SaaS (sentry.io)

SDK version

0.49.5, and master at 12c8785008a9046ddb73a238349c95447e78dde4

Steps to reproduce

impl<T: Transport> Transport for Arc<T> forwards send_envelope and shutdown to T but not flush, so flush called through an Arc<T> runs the trait's default, which returns true at once.

  1. A binary with this Cargo.toml:

    [package]
    name = "arc-transport-flush"
    version = "0.1.0"
    edition = "2024"
    publish = false
    
    [dependencies]
    sentry-core = { git = "https://github.com/getsentry/sentry-rust", rev = "12c8785008a9046ddb73a238349c95447e78dde4" }
    
    [workspace]
    

    and this src/main.rs, whose transport's flush always reports envelopes left behind:

    use std::sync::Arc;
    use std::time::Duration;
    
    use sentry_core::{Envelope, Transport};
    
    /// A transport whose queue never drains, so every flush reports envelopes left behind.
    struct NeverDrains;
    
    impl Transport for NeverDrains {
        fn send_envelope(&self, envelope: Envelope) {
            let _ = envelope;
        }
    
        fn flush(&self, _timeout: Duration) -> bool {
            false
        }
    }
    
    fn main() {
        let direct = Transport::flush(&NeverDrains, Duration::ZERO);
        let through_arc = Transport::flush(&Arc::new(NeverDrains), Duration::ZERO);
        let shutdown_through_arc = Transport::shutdown(&Arc::new(NeverDrains), Duration::ZERO);
        println!("flush on the transport: {direct}");
        println!("flush on Arc<transport>: {through_arc}");
        println!("shutdown on Arc<transport>: {shutdown_through_arc}");
    }
    
  2. cargo run

Expected result

flush on Arc<transport>: false, what flush on the transport itself returns.

Actual result
flush on the transport: false
flush on Arc<transport>: true
shutdown on Arc<transport>: false

rustc 1.99.1 on Windows 11 x64. A caller told by flush through the Arc that the queue drained can end the process with envelopes still queued in T.

Lenguaje dominante
Rust
Estrellas
755
Forks
192
Merge medio
3 d 15 h
PR fusionados (30 d)
12

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

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 getsentry/sentry-rust

Todos los issues de getsentry/sentry-rust

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.