且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

kafka 旧的 consumer_offsets 没有被删除

更新时间:2022-11-05 21:32:43

这里的日期差异很可能是由于重新启动和非正常关机造成的.在这种情况下重建索引文件.就您的偏移主题而言,除非您确定这就是您想要的,否则您不应手动删除它.它可能会导致您的消费者失去状态.该主题已压缩,您根本没有太多数据.我希望您之前已经删除了段,因为我在那里没有看到日志段 0.只要确保您的日志清理器仍然正常工作,您就会没事的.如果您因为 70MB 的日志段而担心磁盘空间,那么您需要更多的磁盘.Kafka 磁盘的大小应为 100 GB.

The date discrepancy here is likely because of a restart with an unclean shutdown. The index files are rebuilt on such cases. As far as your offsets topic goes, you shouldn't manually deleted it unless you know for sure that's what you want. It will potentially cause a loss of state for your consumers. The topic is compacted and you don't have much data in it at all. I expect that you have previously deleted segments before because I don't see log segment 0 there. Just make sure your log cleaner is still functional and you will be ok. If you are worried about disk space because of a 70MB log segment, then you need more disk. Kafka disks should be 100s of GB in size.