Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-14459

Document how to use and close a 'Statistics' in the example RocksDBConfigSetter

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • docs, streams

    Description

      We fixed a memory leak in KAFKA-14432 where we were sometimes failing to close the `Statistics` object used for rocksdb metrics. Since users can define their own Statistics as well, we should make sure they know that this has to be closed like we do for other `RocksDBObject` classes like the Cache. It might also be useful to provide an example of how to use Statistics and what can be done with it.

       

      We currently have two sample RocksDBConfigSetter implementations in the docs, both of which could be updated here:

      1. (rocksdb memory management docs) – consider including a Statistics in this example to highlight that it needs to be closed? This one could arguably be skipped, although the formatting of this sample config setter seems to be messed up so this might be a good opportunity to fix that on the side
      2. rocksdb.config.setter config docs –  this would be a good place to include an example that actually uses the Statistics for something (assuming there's some reason for users to define their own Statistics in the first place, which I personally do not know). We can potentially link to this example from the metrics docs

      Attachments

        Activity

          People

            sujayopensource Sujay Hegde
            ableegoldman A. Sophie Blee-Goldman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: