[DocDB] Make statistic 'log_sync_latency' only be accounted when disk synchronization happens #11039
Labels
area/docdb
YugabyteDB core features
kind/bug
This issue is a bug
priority/medium
Medium priority issue
Jira Link: DB-717
Description
Currently, when a WAL entry is written, it executes yb::log::Log::Sync.
In order to optimize WAL write latency, selective invocations of yb::log::Log::Sync result in sync() (or fdatasync() in the future). However, the log_sync_latency statistic is always accounted for, resulting in "empty" invocations, alias invocations that did not execute fsync(). The means the statistic does not reflect the actual log sync amount, only the theoretical one, and the timing includes the timing of not doing the syncing, which means the timing is the average of calling this function not syncing and calling of this function which does performing the syncing. That average has no useful meaning.
The text was updated successfully, but these errors were encountered: