opensource4you / astraea

釋放kafka的無限潛能
Apache License 2.0
129 stars 46 forks source link

[EXPORTER] Fix the size in RecordWriter never be updated #1821

Closed Haser0305 closed 1 year ago

Haser0305 commented 1 year ago

RecordWriter 中的 size 在 append 中寫入到檔案後並沒有將寫入的內容大小更新到 size 之中,導致後續在判斷是否需要切檔案時始終判斷寫入檔案並沒有超過設定值而持續寫入同一檔案。 因此在 append 中將 recordBuilder 的 serializedSize 計算到 size 之中以避免上述狀況,並新增相關的測試來確認是否有這問題的發生。