Offline storage: Flush() persists EventPersistence_DoNotStoreOnDisk records to disk when the RAM tier is active
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
Línea de trabajo
Empieza leyendo OfflineStorageHandler::Flush(), StoreRecord() y el comportamiento del enum EventPersistence_DoNotStoreOnDisk descrito aquí. Confirma el contrato previsto con los maintainers antes de cambiar nada. Se considera completado cuando la semántica de «solo disco» está documentada o renombrada, o cuando el contrato de «sin disco» se hace cumplir durante el flush con una prueba de regresión.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
OfflineStorageHandler::Flush() drains the entire in-memory queue and persists it to the disk backend in one batch:
auto records = m_offlineStorageMemory->GetRecords(false, EventLatency_Unspecified);
size_t totalSaved = m_offlineStorageDisk->StoreRecords(records);
This batch includes records whose persistence == EventPersistence::EventPersistence_DoNotStoreOnDisk. As a result, when the RAM tier is active (the normal configuration), a DoNotStoreOnDisk record that entered the in-memory queue can be written to disk on a memory-pressure flush and survive a process restart.
By contrast, OfflineStorageHandler::StoreRecord() explicitly skips such records — but only in the disk-only fallback branch (no RAM tier / shutdown):
else // m_offlineStorageMemory == nullptr || m_shutdownStarted
{
if (m_offlineStorageDisk != nullptr)
{
if (record.persistence != EventPersistence::EventPersistence_DoNotStoreOnDisk)
{
return m_offlineStorageDisk->StoreRecord(record);
}
}
}
When the RAM tier is present, StoreRecord() inserts every record into memory unconditionally (no persistence check), so DoNotStoreOnDisk records ride the normal RAM→disk flush path.
Pre-existing
This behavior is not introduced by the batched-flush change in #1491 — the pre-#1491 Flush() on main already called m_offlineStorageDisk->StoreRecords(records) on the full drained batch with no DoNotStoreOnDisk filter. This issue tracks the semantics question separately so #1491 stays focused.
The open question
The DoNotStoreOnDisk filter existing only in the disk-only fallback branch suggests the current flush-to-disk behavior may be intentional (i.e. the flag means "skip only when forced straight to disk without a RAM tier"). But the enum name implies these records should never be written to disk under any configuration. The two readings disagree.
Options for maintainers
- Treat current behavior as intentional and document/rename the enum to make the "disk-only fallback path" semantics explicit, so the name no longer implies a global no-disk contract.
- Enforce a global no-disk contract: during flush, partition
DoNotStoreOnDiskrecords out of the disk batch and re-insert them into the RAM queue (rather than draining + persisting them). This keeps them in memory until upload or drop, at the cost of possible RAM accumulation if they are never uploaded, and would need a regression test.
Surfaced during the #1491 review (Copilot). Filing as a follow-up per maintainer direction.
- Lenguaje dominante
- C
- Estrellas
- 102
- Forks
- 66
- Merge medio
- 3 d 10 h
- PR fusionados (30 d)
- 10
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/cpp_client_telemetry
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
microsoft/cpp_client_telemetry#1333 ·
-
C API enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
bug
microsoft/cpp_client_telemetry#1437 · 1 asignado ·
-
Dropping of telemetry events Abiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
microsoft/cpp_client_telemetry#1413 · 2 comentarios ·
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
microsoft/cpp_client_telemetry#1391 ·
Todos los issues de microsoft/cpp_client_telemetry
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
BasedHardware/omi#15662 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
level/task module/gcp type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
-
Build failure with newer clang Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
hapostgres/pg_auto_failover#1190 ·