1559924775 commented on a change in pull request #2975:
URL: https://github.com/apache/bookkeeper/pull/2975#discussion_r804319230
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieImpl.java
##########
@@ -1259,7 +1261,17 @@ LedgerDescriptor getLedgerForEntry(ByteBuf entry, final
byte[] masterKey)
}
private Journal getJournal(long ledgerId) {
- return journals.get(MathUtils.signSafeMod(ledgerId, journals.size()));
+ String dividendString = Double.toString(ledgerId);
Review comment:
> @1559924775 I hope you are still interested in fixing this issue. My
PR #3023 fixes similar problem with routing of requests to threads, I think the
routing logic change can be reused for the journals and it is faster than
md5/murmur/other hashing.
>
> As a follow up to the discussion [#2974
(comment)](https://github.com/apache/bookkeeper/issues/2974#issuecomment-1028054818)
the change requires some additional thinking to prevent data loss during
upgrade/downgrade. I think backwards compat tests can help with this, but you
will need to add tests for upgrade from old version with 2 journal/2 data disks
to the new version with changed routing. The test will need to repro the case
when journal replay is needed etc.
Thanks for your idea. I'll consider it.
--
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]