merlimat opened a new pull request, #3959: URL: https://github.com/apache/bookkeeper/pull/3959
### Motivation This PR solves the problem described #3940. Because compaction is triggering a flush after each entry log file is compacted, the flush on the DbLedgerStorage causes the write cache to be underutilized and ultimately it will slow down the writes. ### Changes The call to `flush()` in `updateEntriesLocations()` was there to ensure that every entry log file we might be compacting has the indexes already flushed into RocksDB. If that's not the case, the compaction might first write the new location and the regular flush will override it with the old location, to a file that is already deleted. In practice, we don't actually need to trigger a new flush for that to be valid, we just need to ensure that if there is a pending `flush()`, we wait until it's done. If there are no pending flushes, we're also good to go. -- 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]
