yugabyte/yugabyte-db

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

Chiusa

#25.615 aperta il 14 gen 2025

 (3 commenti) (0 reazioni) (1 assegnatario)C (1003 fork)batch import
area/docdbgood first issuekind/enhancementpriority/medium

Metriche repository

Star
 (8229 stelle)
Metriche merge PR
 (Merge medio 17g 21h) (92 PR mergiate in 30 g)

Descrizione

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.

Guida contributor