travisjeffery / jocko

Kafka implemented in Golang with built-in coordination (No ZK dep, single binary install, Cloud Native)
https://twitter.com/travisjeffery
MIT License
4.94k stars 363 forks source link

Write to CommitLog and Index does not in a transaction. #175

Open yiippee opened 3 years ago

yiippee commented 3 years ago

Thanks a lot for your project, it is very helpful for me to learn kafka. When I see the code, I find that, writeing a meesage to CommitLog and Index does not in a transaction, so how to ensure the consistency, or maybe I miss something? Thanks again. I am a Chinese student, so forgive my poor English.

tangtaoit commented 3 years ago

index和log本来就不需要事务 就算log写成功了 index没写成功 不影响程序正常运行,因为index本来就是稀散索引