[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14237846#comment-14237846
 ] 

Hadoop QA commented on BOOKKEEPER-821:
--------------------------------------

Testing JIRA BOOKKEEPER-821


Patch 
[BOOKKEEPER-821_no-prefix.patch|https://issues.apache.org/jira/secure/attachment/12685742/BOOKKEEPER-821_no-prefix.patch]
 downloaded at Mon Dec  8 12:30:17 UTC 2014

----------------------------

{color:green}+1 PATCH_APPLIES{color}
{color:green}+1 CLEAN{color}
{color:red}-1 RAW_PATCH_ANALYSIS{color}
.    {color:green}+1{color} the patch does not introduce any @author tags
.    {color:green}+1{color} the patch does not introduce any tabs
.    {color:green}+1{color} the patch does not introduce any trailing spaces
.    {color:green}+1{color} the patch does not introduce any line longer than 
120
.    {color:red}-1{color} the patch does not add/modify any testcase
{color:green}+1 RAT{color}
.    {color:green}+1{color} the patch does not seem to introduce new RAT 
warnings
{color:green}+1 JAVADOC{color}
.    {color:green}+1{color} the patch does not seem to introduce new Javadoc 
warnings
{color:green}+1 COMPILE{color}
.    {color:green}+1{color} HEAD compiles
.    {color:green}+1{color} patch compiles
.    {color:green}+1{color} the patch does not seem to introduce new javac 
warnings
{color:green}+1 FINDBUGS{color}
.    {color:green}+1{color} the patch does not seem to introduce new Findbugs 
warnings
{color:green}+1 TESTS{color}
.    Tests run: 934
{color:green}+1 DISTRO{color}
.    {color:green}+1{color} distro tarball builds with the patch 

----------------------------
{color:red}*-1 Overall result, please check the reported -1(s)*{color}


The full output of the test-patch run is available at

.   https://builds.apache.org/job/bookkeeper-trunk-precommit-build/877/

> Failing to write lastId to ledger directories should not fail startup of 
> bookies
> --------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-821
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-821
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>    Affects Versions: 4.3.0
>            Reporter: zhaijia
>            Assignee: zhaijia
>             Fix For: 4.3.1
>
>         Attachments: BOOKKEEPER-821_no-prefix.patch
>
>   Original Estimate: 5h
>  Remaining Estimate: 5h
>
> In EntryLoggerAllocator::allocateNewLog(), setLastLogId() failed, should not 
> fail startup of bookies. 
> Failed setLastLogId could be tolerated because the while loop handles it.
> {code}
>         /**
>          * Allocate a new log file.
>          */
>         BufferedLogChannel allocateNewLog() throws IOException {
>             List<File> list = ledgerDirsManager.getWritableLedgerDirs();
>             Collections.shuffle(list);
>             // It would better not to overwrite existing entry log files
>             File newLogFile = null;
>             do {
>                 String logFileName = Long.toHexString(++preallocatedLogId) + 
> ".log";
>                 for (File dir : list) {
>                     newLogFile = new File(dir, logFileName);
>                     currentDir = dir;
>                     if (newLogFile.exists()) {     < === this will handle 
> last set fail issue, only caused one more loop.
>                         LOG.warn("Found existed entry log " + newLogFile
>                                + " when trying to create it as a new log.");
>                         newLogFile = null;
>                         break;
>                     }
>                 }
>             } while (newLogFile == null);
>             FileChannel channel = new RandomAccessFile(newLogFile, 
> "rw").getChannel();
>             BufferedLogChannel logChannel = new BufferedLogChannel(channel,
>                     conf.getWriteBufferBytes(), conf.getReadBufferBytes(), 
> preallocatedLogId);
>             logChannel.write((ByteBuffer) LOGFILE_HEADER.clear());
>             for (File f : list) {
>                 setLastLogId(f, preallocatedLogId);
>             }
>             LOG.info("Preallocated entry logger {}.", preallocatedLogId);
>             return logChannel;
>         }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to