xjrk58 opened a new pull request, #24310:
URL: https://github.com/apache/kafka/pull/24310

   …tion fails
   
   https://issues.apache.org/jira/browse/KAFKA-21580
   
   The `TopologyTestDriver` constructor sets up the global task and the task, 
which opens their state stores. When that setup throws, for example because a 
task is corrupted or a processor fails to initialize, the caller gets no driver 
to close and the stores stay open. A persistent store then keeps its RocksDB 
instance and its lock until the JVM exits.
   
   The constructor now closes the task dirty and closes the global state 
manager before it rethrows the failure. It does not clean the state directory 
as `close()` does. The dirty close of the task deletes the task directory under 
exactly-once, as it does in Kafka Streams.
   
   `SegmentedStoreWithoutSegmentsTest`, added in KAFKA-21492, expects such a 
failure and left a RocksDB segment open for each of its parameterizations.
   
   Testing:
   - `TopologyTestDriverTest` covers a processor that fails to initialize, once 
for a state store and once for a global state store, and checks that the store 
is closed. Both tests fail without the fix.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to