[DocDB] Enable printing out why each RocksDB flush is being done
#25,615 创建于 2025年1月14日
仓库指标
- 星标
- (8,229 个星标)
- PR 合并指标
- (平均合并 17天 21小时) (30 天内合并 92 个 PR)
描述
Jira Link: DB-14868
Description
We have had two incidents now where inability to figure out why RocksDB flushes were occurring was key and extremely hard to figure out.
This task is to build instrumentation to make this easier in the future.
That is, create a runtime-settable gflag that turns on logging messages that for each flush describe why it is being done.
Reasons might include:
- to stay under the global MemTable limit
- to stay under the local MemTable limit
- by request of a flush table RPC call
- flush requested by DoCleanupIntentFiles
The above is almost certainly not a complete list. Ideally this task instruments all the calls to flush.
Although not ideal, it's probably acceptable for the reason log message to be given earlier than the log message announcing the flush itself as long as they can be correlated.
Ideally backport this to all versions in use.
Issue Type
kind/enhancement
Warning: Please confirm that this issue does not contain any sensitive information
- I confirm this issue does not contain any sensitive information.