Transaction Buffer
aborted
messages indexes and ongoing
TXN messages indexes in memory, we call them Two Indexes
in the following sections.on-going
TXN, to avoid consuming aborted messages or TXN in-progress messages.Transaction Buffer initializes when a topic is loading up
Two Indexes
into memory.Transaction Buffer closing when a topic is unloading
Two Indexes
to rebuild the states faster next loading up.Two Indexes
for every topic if you enable TXN.Two Indexes
costs huge resources(CPU, Memory).We'd better skip Transaction Buffer re-building Two Indexes
if the topic it is related to does not contain TXN messages to save resources usage.
Skip Transaction Buffer re-building Two Indexes
if the topic it is related to does not contain TXN messages to save resources usage.
This PIP only focuses on improving the scenario in which users have never published TXN messages on a topic.
This PIP does not focus on the scenario that follows.
Two Indexes
even if there are no TXN messages in the topic anymore, and it costs resources.__contains_txn_messages
, the default value is false
, and it will be set to true
when the first TXN message is publishing.Two Indexes
if the property is false
.The topic property __contains_txn_messages
becomes to a system property, it can never be used by users anymore.
NotAllowedException
when you try to set/remove a topic property named __contains_txn_messages
by the API pulsar-admin topics update-properties/remove-properties
.__contains_txn_messages
can be queried by pulsar-admin topics get-properties
.Name | Description | Attributes | Units |
---|---|---|---|
pulsar_broker_using_txn_topics_count | Counter. The number of topics contains TXN messages. | cluster | - |
There are 3
scenarios that the topic's property __contains_txn_messages
is when users try to upgrade.
__contains_txn_messages
is empty: broker initializes it by confirming whether there is TXN messages or not.__contains_txn_messages
is not empty and is not typed boolean
, rollback to the original behavior that always re-building Two Indexes
, but you can never modify it anymore.__contains_txn_messages
is not empty and is typed boolean
, but it is a users' property, broker assumed that it is a system property.You can downgrade or roll back gracefully.
The PIP does not affect Geo-Replication.