KAFKA-7534: Error in flush calling close may prevent underlying store from closing#5833
Conversation
| try { | ||
| flush(); | ||
| } finally { | ||
| underlying.close(); |
There was a problem hiding this comment.
Should we have a nested try-catch to make use cache.close() is called, too? Not sure how critical it is to ensure that the cache is closed?
There was a problem hiding this comment.
I had that, but I took it out for the same reason thinking it's not important to ensure the cache is closed. But thinking about it some more, it doesn't hurt anything, so I'll put it back.
|
updated this |
|
Java 11 build timed out. retest this please |
|
failure unrelated retest this please |
|
LGTM. Thanks, @bbejeck . |
|
retest this please |
|
@omkreddy can we please get this PR into |
|
Both builds timed out after 3 hours retest this please |
|
Merging. Java8 is green. \cc @vvcephei |
… from closing (#5833) Reviewers: John Roesler <john@confluent.io>, Matthias J. Sax <matthias@confluent.io>
… from closing (#5833) Reviewers: John Roesler <john@confluent.io>, Matthias J. Sax <matthias@confluent.io>
… from closing (#5833) Reviewers: John Roesler <john@confluent.io>, Matthias J. Sax <matthias@confluent.io>
… from closing (#5833) Reviewers: John Roesler <john@confluent.io>, Matthias J. Sax <matthias@confluent.io>
|
Merged to |
… from closing (apache#5833) Reviewers: John Roesler <john@confluent.io>, Matthias J. Sax <matthias@confluent.io>
Calling the
CachingKeyValueStore#close()method first callsCachingKeyValueStore.flush(). If there is an exception thrown during theflushcall, the underlying store is not closed. Subsequently, another task can't open the RocksDB store and receives aNo locks availableexception.I added a unit test that fails with the proposed fix.
Committer Checklist (excluded from commit message)