mirror of https://github.com/apache/kafka.git
KAFKA-2308: make MemoryRecords idempotent; reviewed by Guozhang Wang
This commit is contained in:
parent
4204f4a06b
commit
67b6b9a45b
|
@ -115,9 +115,11 @@ public class MemoryRecords implements Records {
|
|||
* Close this batch for no more appends
|
||||
*/
|
||||
public void close() {
|
||||
compressor.close();
|
||||
writable = false;
|
||||
buffer = compressor.buffer();
|
||||
if (writable) {
|
||||
compressor.close();
|
||||
writable = false;
|
||||
buffer = compressor.buffer();
|
||||
}
|
||||
}
|
||||
|
||||
/** Write the records in this set to the given channel */
|
||||
|
|
Loading…
Reference in New Issue