indexDir compatible fix for issue #3430#3433
Conversation
|
@horizonzy thanks for your issue, |
bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/CookieIndexDirTest.java
Outdated
Show resolved
Hide resolved
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Cookie.java
Outdated
Show resolved
Hide resolved
1a88ef0 to
a7e3c28
Compare
a7e3c28 to
905d317
Compare
Descriptions of the changes in this PR: ### Motivation Fixes apache#3430, make cookie validation is compatible with old version. I think we should check indexDirs when configuration‘s indexDirectories is setted rather than avoiding the check ### Changes 1. add compatible check 2. add testcase to cover the new code (cherry picked from commit f06800c)
|
I'm not sure if I am missing something because this is a year old merged bug .. but updating a cluster from 4.15.4 to 4.16.3 (both using the dockerhub official images ) a fast check on the code and the problem maybe was because I've used a specified indexDirs instead of the default (ledgerdir) one ? but the code seems to assume that if the cookie is blank then it's the ledgerDirs ( and shouldn't assume that because can be configured differently in the configuration ) as note for others in the same situation my workaround has been to do a rolling update with the reset cookie |
Ok, let me check it. |
Yes, it's indeed a problem. If the cookie doesn't has indexDirs, we shouldn't consider |
I think we should upgrade the cookie version, or we can't know the indexDirs is a really null or just a old version without indexDirs. |
I have submitted a PR to fix it. Could you help to check it? #4087 |
Descriptions of the changes in this PR: ### Motivation Fixes apache#3430, make cookie validation is compatible with old version. I think we should check indexDirs when configuration‘s indexDirectories is setted rather than avoiding the check ### Changes 1. add compatible check 2. add testcase to cover the new code
Descriptions of the changes in this PR:
Motivation
Fixes #3430, make cookie validation is compatible with old version.
I think we should check indexDirs when configuration‘s indexDirectories is setted rather than avoiding the check
Changes