You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
External table reads and regular SST reads map Env::IOActivity to the FILE_READ_* histograms through one shared helper, so the two paths cannot drift apart.
Actual behavior
The mapping exists twice in the tree:
GetFileReadHistograms — file/random_access_file_reader.cc:26 (file-local inline, not declared in any header)
The two bodies are identical except for the signature line — presumably copied because the original is inline in a .cc and cannot be reused from another translation unit:
Any future IOActivity case or stats-level condition added to one copy will silently miss the other: the missed path falls through to HISTOGRAM_ENUM_MAX and records nothing, so external-table reads would stop matching regular SST reads for that activity — the exact skew #14839 set out to prevent.
Steps to reproduce the behavior
Not a runtime bug yet; the copies are still in sync as of 5b1c3b3. Filing before they diverge.
Suggested fix: hoist GetFileReadHistograms into file/random_access_file_reader.h and call it from table/external_table.cc, deleting the copy. Happy to send a PR if that sounds right.
Expected behavior
External table reads and regular SST reads map
Env::IOActivityto theFILE_READ_*histograms through one shared helper, so the two paths cannot drift apart.Actual behavior
The mapping exists twice in the tree:
GetFileReadHistograms—file/random_access_file_reader.cc:26(file-localinline, not declared in any header)GetExternalTableFileReadHistogram—table/external_table.cc:26(anonymous namespace), added by Wire external table reads into RocksDB metrics #14839 ("Wire external table reads into RocksDB metrics")The two bodies are identical except for the signature line — presumably copied because the original is
inlinein a.ccand cannot be reused from another translation unit:Any future
IOActivitycase or stats-level condition added to one copy will silently miss the other: the missed path falls through toHISTOGRAM_ENUM_MAXand records nothing, so external-table reads would stop matching regular SST reads for that activity — the exact skew #14839 set out to prevent.Steps to reproduce the behavior
Not a runtime bug yet; the copies are still in sync as of 5b1c3b3. Filing before they diverge.
Suggested fix: hoist
GetFileReadHistogramsintofile/random_access_file_reader.hand call it fromtable/external_table.cc, deleting the copy. Happy to send a PR if that sounds right.