Francisco Guerrero created CASSANDRA-21593:
----------------------------------------------
Summary: CEP-45: Fix OpOrder.Group leak in
ReadExecutionController.forCommand()
Key: CASSANDRA-21593
URL: https://issues.apache.org/jira/browse/CASSANDRA-21593
Project: Apache Cassandra
Issue Type: Bug
Components: Legacy/Core
Reporter: Francisco Guerrero
When repaired-data tracking is enabled for partition reads and a read against a
tracked table went through read-repair's digest-mismatch path, the
{{ReadExecutionController}}'s constructor is throwing an
{{IllegalArgumentException}}. In
{{org.apache.cassandra.db.ReadExecutionController#forCommand}} we are starting
the {{OpOrder.Group}}, without a try/catch/finally guard. When the exception is
thrown, we are leaking {{OpOrder.Group}}. We are also not closing the
{{OpOrder.Group}} for the index case in the {{indexCfs}}. A leaked Group never
reaches the {{FINISHED}} state and then hanging {{OpOrder.Barrier.await()}} for
every later barrier on that {{readOrdering}} and eventually blocking writes
with no {{ERROR}} logged.
The proposed fix focuses on two parts:
1. Excluded tracked tables when starting a repair in
{{AbstractReadRepair.startRepair()}}. This is what triggers this issue.
2. Better handling of exceptions during
{{ReadExecutionController.forCommand()}}, ensuring that the critical paths are
in the try/catch block and properly handling closing the objects that exist.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]