[
https://issues.apache.org/jira/browse/BOOKKEEPER-345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13436778#comment-13436778
]
Sijie Guo commented on BOOKKEEPER-345:
--------------------------------------
thanks, Vinay. the patch is pretty good. my comments are as below:
the patch is compiled failure due to you passed ledgerDirsManager to
LedgerCacheImpl. I am guessing it is introduced in BOOKKEEPER-346. could you
fix it?
{quote}
+ public boolean isReadonly() {
+ return readonly;
+ }
{quote}
I am just guessing, if a bookie is readOnly, should we reject following write
requests? But I don't see any place use this variable. If no one use it, please
remove it. If someone use it, shall we mark it as volatile?
{quote}
+ // During disk full, some of the contents flush may fail.
+ // Exception also will not be thrown.
+ if (bc.position() != this.position) {
+ throw new IOException(
+ "Error during flushing. All contents not flushed");
+ }
{quote}
it introduced a findbugs error, 'position' is 50% synchronized.
{quote}
public ReadOnlyEntryLogger(ServerConfiguration conf) throws IOException {
- super(conf);
+ super(conf, null);
}
{quote}
You'd better construct a LedgerDirsManager using the conf. Since
ledgerDirsManager not only used in those write-only methods.
For testcase, I think you need two more test cases, one is about rollLog, the
other is about setLastLogId. You'd better test them to. Also, you added code to
turn bookie server to readonly mode. But there is no test case to test about
it. I think you need to add one to check whether the bookie is actually put it
readonly.
> Detect IOExceptions on entrylogger and bookie should consider next ledger
> dir(if any)
> -------------------------------------------------------------------------------------
>
> Key: BOOKKEEPER-345
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-345
> Project: Bookkeeper
> Issue Type: Sub-task
> Components: bookkeeper-server
> Affects Versions: 4.1.0
> Reporter: Rakesh R
> Attachments: BOOKKEEPER-345.patch, BOOKKEEPER-345.patch
>
>
> This jira to detect IOExceptions in "EntryLogger", and will iterate over all
> the configured ledger(s) on IOException. Finally if no writable dirs
> available, will move bookie to r-o mode(if this mode is enabled).
> By default(r-o mode will be disabled) the bookie will shutdown if no writable
> disk available.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira