Eduwer Camacaro created KAFKA-21624:
---------------------------------------
Summary: RocksDBStore stalls when offsets CF reaches 2 immutable
memtables
Key: KAFKA-21624
URL: https://issues.apache.org/jira/browse/KAFKA-21624
Project: Kafka
Issue Type: Bug
Components: streams
Affects Versions: 4.4.0, 4.3.0
Reporter: Eduwer Camacaro
I’ve been testing transactional state stores in my load-test cluster, and I
noticed that there are store-wide write stalls triggered by the {{offsets}}
column family:
{code:java}
[offsets] Stopping writes because we have 2 immutable memtables (waiting for
flush), max_write_buffer_number is set to 2{code}
That’s from the Rocksdb logs, I see over 220 stalls caused by the {{offsets}}
CF, and 0 stalls caused by the {{default}} CF.
While reading the code for the RocksdbStore I noticed that in
RocksDBStore.openDB(), the offsets CF receives a new ColumnFamilyOptions
instance. We don’t set a config for max_write_buffer_number, so it inherits
RocksDB’s default of 2. Now that we have atomic flushes enabled for both
default and offsets CF, any flush triggered by the default CF also flush the
offsets CF’s memtable. If another flush is scheduled before the earlier flush
completes, the offsets CF can accumulate two unflushed immutable memtables and
stop writes to the entire RocksDB instance.
I believe that’s a regression because it limits users’ ability to increase
memtable buffering to tolerate temporary memtable flush backlogs.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)