yugabyte/yugabyte-db

[DocDB] Enable printing out why each RocksDB flush is being done

Closed

#25,615 建立於 2025年1月14日

在 GitHub 查看
 (3 留言) (0 反應) (1 負責人)C (8,229 star) (1,003 fork)batch import
area/docdbgood first issuekind/enhancementpriority/medium

描述

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.

貢獻者指南