Browse Source
This patch fixes a bug in the append logic which can cause duplicate offsets to be appended to the log when the append to the transaction index fails. Rather than incrementing the log end offset after the index append, we do it immediately after the records are written to the log. If the index append later fails, we do two things: 1) We ensure that the last stable offset cannot advance. This guarantees that the aborted data will not be returned to the user until the transaction index contains the corresponding entry. 2) We skip updating the end offset of the producer state. When recovering the log, we will have to reprocess the log and write the index entries. Reviewers: Jun Rao <junrao@gmail.com>pull/6603/head
Jason Gustafson
6 years ago
committed by
GitHub
6 changed files with 122 additions and 15 deletions
Loading…
Reference in new issue