facebook/rocksdb

Discussion of a new observable

MalikHou opened this issue · 0 comments

Hi All
There is a trace sampling requirement in our business, the purpose is to understand what a query request has experienced throughout its life cycle. The existing trace solution is obviously not very satisfactory. My initial idea is as follows:

  1. Add trace strcut, which includes some data:
  • bool hit_mem_table;
  • bool hit_row_cache;
  • bool hit_block_cache;
  • bool hit_sys_disk;
  • uint64_t read_disk_us;
    ...
  1. Overload the new Get method and add the parameter trace struct to the function signature;
  2. If the trace object exists, write the statistical information to the trace in the key path of the code.

Note that the generation of trace has a certain sampling rate, and not every request calls this method.

I haven't received a timely reply in the mail group & hope to hear from everyone