nsnycde commented on PR #4607: URL: https://github.com/apache/bookkeeper/pull/4607#issuecomment-3218693761
org.apache.bookkeeper.bookie.EntryLogManagerForSingleEntryLog#createNewLog(long, java.lang.String) createNewLog 带reason的参数方法未加锁,会存在并发调用问题,至少在SortedStorage下大概率会出现并发问题,在GC写入线程和sortedLedger写入线程、checkpoint都可能并发创建NewLog,导致并发处理log尾部的index数据:会造成数据写入错乱导致解析出错,同理造成解析log尾部index数据出错(index数据、entrySize数据、entry数据交替写入);理论上dbLedger没有这个问题,dbLedger调用createNewLog是通过getCurrentLogForLedgerForAddEntry触发的,该方法有加锁 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
