<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Title" content="">
<meta name="Keywords" content="">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"MS 明朝";}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:Calibri;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Calibri;
        color:windowtext;}
span.msoIns
        {mso-style-type:export-only;
        mso-style-name:"";
        text-decoration:underline;
        color:teal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:Calibri;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body bgcolor="white" lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">We are getting the same error that is in bug ID 0000231<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Here is what the application is trying to do - how we reproduced it:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">We have a Java based application that is using Tomcat, Hibernate Search (Lucene), PostgreSQL and Pgpool-II.&nbsp;&nbsp;When the application tries to re-create the Lucene indexes it fails and throws this error:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">2016-12-05 13:57:25: pid 15638: WARNING: packet kind of backend 1 ['3'] does not match with master/majority nodes packet kind ['1']<br>
2016-12-05 13:57:25: pid 15638: FATAL: failed to read kind from backend<br>
2016-12-05 13:57:25: pid 15638: DETAIL: kind mismatch among backends. Possible last query was: &quot;COMMIT&quot; kind details are: 0[1] 1[3]<br>
2016-12-05 13:57:25: pid 15638: HINT: check data consistency among db nodes<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">The Java code for re-indexing Lucene can be tuned a little bit by indicating the number of threads that concurrently load records from the DB.&nbsp;&nbsp;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Here is the code we are using:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">{code}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">entityManager<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">&nbsp;&nbsp;.createIndexer(Person.class)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">&nbsp;&nbsp;.batchSizeToLoadObjects(100)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">&nbsp;&nbsp;.cacheMode(CacheMode.NORMAL)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">&nbsp;&nbsp;.threadsToLoadObjects(5)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">&nbsp;&nbsp;.threadsForSubsequentFetching(10)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">&nbsp;&nbsp;.startAndWait();<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">{code}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt">Wolfgang Schwurack<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt">Database/System Administrator<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt">Utah Education Network<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt">801-587-9444<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt"><a href="mailto:wolf@uen.org"><span style="color:#0B4CB4">wolf@uen.org</span></a><o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>