<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
    <head> 
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> <base href="https://hibernate.atlassian.net" /> 
        <title>Message Title</title> 
    </head> 
    <body class="jira" style="color: #333; font-family: Arial, sans-serif; font-size: 14px; line-height: 1.429"> 
        <table id="background-table" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #f5f5f5; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
            <!-- header here --> 
            <tr> 
                <td id="header-pattern-container" style="padding: 0px; border-collapse: collapse; padding: 10px 20px"> 
                    <table id="header-pattern" cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
                        <tr> 
                            <td id="header-avatar-image-container" valign="top" style="padding: 0px; border-collapse: collapse; vertical-align: top; width: 32px; padding-right: 8px"> <img id="header-avatar-image" class="image_fix" src="https://secure.gravatar.com/avatar/57637a2eb871b34eba14e700c78c6a5d?d=mm&amp;s=48" height="32" width="32" border="0" style="border-radius: 3px; vertical-align: top" /> 
                            </td> 
                            <td id="header-text-container" valign="middle" style="padding: 0px; border-collapse: collapse; vertical-align: middle; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 1px"> <a class="user-hover" rel="sanne" id="email_sanne" href="https://hibernate.atlassian.net/secure/ViewProfile.jspa?name=sanne" style="color:#6c797f;; color: #3b73af; text-decoration: none">Sanne Grinovero</a> <strong>updated</strong> an issue 
                            </td> 
                        </tr> 
                    </table> 
                </td> 
            </tr> 
            <tr> 
                <td id="email-content-container" style="padding: 0px; border-collapse: collapse; padding: 0 20px"> 
                    <table id="email-content-table" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0; border-collapse: separate"> 
                        <tr> 
                            <!-- there needs to be content in the cell for it to render in some clients --> 
                            <td class="email-content-rounded-top mobile-expand" style="padding: 0px; border-collapse: collapse; color: #fff; padding: 0 15px 0 16px; height: 15px; background-color: #fff; border-left: 1px solid #ccc; border-top: 1px solid #ccc; border-right: 1px solid #ccc; border-bottom: 0; border-top-right-radius: 5px; border-top-left-radius: 5px; height: 10px; line-height: 10px; padding: 0 15px 0 16px; mso-line-height-rule: exactly">
                                &nbsp;
                            </td> 
                        </tr> 
                        <tr> 
                            <td class="email-content-main mobile-expand " style="padding: 0px; border-collapse: collapse; border-left: 1px solid #ccc; border-right: 1px solid #ccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #fff"> 
                                <table class="page-title-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
                                    <tr> 
                                        <td class="page-title-pattern-first-line " style="padding: 0px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; padding-top: 10px"> <a href="https://hibernate.atlassian.net/browse/HSEARCH" style="color: #3b73af; text-decoration: none">Hibernate Search</a> / <a href="https://hibernate.atlassian.net/browse/HSEARCH-1699" style="color: #3b73af; text-decoration: none"><img src="cid:jira-generated-image-static-improvement-075385b6-c98e-4faf-9f97-67dc07f3d791" height="16" width="16" border="0" align="absmiddle" alt="Improvement" style="vertical-align: text-bottom" /></a> <a href="https://hibernate.atlassian.net/browse/HSEARCH-1699" style="color: #3b73af; text-decoration: none">HSEARCH-1699</a> 
                                        </td> 
                                    </tr> 
                                    <tr> 
                                        <td style="vertical-align: top;; padding: 0px; border-collapse: collapse; padding-right: 5px; font-size: 20px; line-height: 30px; mso-line-height-rule: exactly" class="page-title-pattern-header-container"> <span class="page-title-pattern-header" style="font-family: Arial, sans-serif; padding: 0; font-size: 20px; line-height: 30px; mso-text-raise: 2px; mso-line-height-rule: exactly; vertical-align: middle"> <a href="https://hibernate.atlassian.net/browse/HSEARCH-1699" style="color: #3b73af; text-decoration: none">Batching IndexWriter commits for multiple synchronous worksets</a> </span> 
                                        </td> 
                                    </tr> 
                                </table> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td class="email-content-main mobile-expand  wrapper-special-margin" style="padding: 0px; border-collapse: collapse; border-left: 1px solid #ccc; border-right: 1px solid #ccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #fff; padding-top: 10px; padding-bottom: 5px"> 
                                <table class="keyvalue-table" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
                                    <tr> 
                                        <th style="color: #707070; font: normal 14px/20px Arial, sans-serif; text-align: left; vertical-align: top; padding: 2px 0">
                                            Change By:
                                        </th> 
                                        <td style="padding: 0px; border-collapse: collapse; font: normal 14px/20px Arial, sans-serif; padding: 2px 0 2px 5px; vertical-align: top"> <a class="user-hover" rel="sanne" id="email_sanne" href="https://hibernate.atlassian.net/secure/ViewProfile.jspa?name=sanne" style="color:#6c797f;; color: #3b73af; text-decoration: none">Sanne Grinovero</a> 
                                        </td> 
                                    </tr> 
                                </table> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td class="email-content-main mobile-expand  issue-description-container" style="padding: 0px; border-collapse: collapse; border-left: 1px solid #ccc; border-right: 1px solid #ccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #fff; padding-top: 5px; padding-bottom: 10px"> 
                                <table class="text-paragraph-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 2px"> 
                                    <tr> 
                                        <td class="text-paragraph-pattern-container mobile-resize-text " style="padding: 0px; border-collapse: collapse; padding: 0 0 10px 0"> <span class="diffcontext">An&nbsp;NRT&nbsp;based&nbsp;backend&nbsp;is&nbsp;orders&nbsp;of&nbsp;magnitude&nbsp;more&nbsp;efficient&nbsp;than&nbsp;a&nbsp;non-NRT&nbsp;one&nbsp;as&nbsp;it&nbsp;avoids&nbsp;a&nbsp;full&nbsp;flush&nbsp;cycle&nbsp;to&nbsp;the&nbsp;index&nbsp;for&nbsp;each&nbsp;{{LuceneBackendQueueTask}}&nbsp;which&nbsp;is&nbsp;applied&nbsp;to&nbsp;the&nbsp;index,&nbsp;and&nbsp;only&nbsp;triggers&nbsp;such&nbsp;flush&nbsp;to&nbsp;the&nbsp;Directory&nbsp;on&nbsp;specific&nbsp;needs&nbsp;(like&nbsp;when&nbsp;the&nbsp;in-memory&nbsp;buffers&nbsp;are&nbsp;running&nbsp;out&nbsp;of&nbsp;space).<br /><br />But&nbsp;since&nbsp;changes&nbsp;are&nbsp;buffered&nbsp;in&nbsp;memory&nbsp;rather&nbsp;than&nbsp;being&nbsp;pushed&nbsp;to&nbsp;the&nbsp;store&nbsp;right&nbsp;away,&nbsp;an&nbsp;application&nbsp;requiring&nbsp;synchronous&nbsp;changes&nbsp;but&nbsp;using&nbsp;the&nbsp;Infinispan&nbsp;Directory&nbsp;to&nbsp;replicate&nbsp;changes&nbsp;to&nbsp;other&nbsp;application&nbsp;nodes&nbsp;can't&nbsp;use&nbsp;NRT&nbsp;as&nbsp;these&nbsp;changes&nbsp;would&nbsp;not&nbsp;be&nbsp;propagated&nbsp;synchronously,&nbsp;they&nbsp;would&nbsp;only&nbsp;be&nbsp;visible&nbsp;eventually&nbsp;when&nbsp;a&nbsp;flush&nbsp;event&nbsp;is&nbsp;triggered.<br /><br />Consider&nbsp;that&nbsp;the&nbsp;Infinispan&nbsp;Directory&nbsp;can&nbsp;provide&nbsp;exceptional&nbsp;read&nbsp;efficiency&nbsp;but&nbsp;is&nbsp;not&nbsp;efficient&nbsp;at&nbsp;all&nbsp;at&nbsp;handling:<br />&nbsp;-&nbsp;read&nbsp;locks&nbsp;as&nbsp;they&nbsp;need&nbsp;to&nbsp;be&nbsp;emulated&nbsp;with&nbsp;multiple&nbsp;RPCs&nbsp;doing&nbsp;optimistic&nbsp;CAS&nbsp;operations<br />&nbsp;-&nbsp;index&nbsp;metadata&nbsp;replacements&nbsp;are&nbsp;also&nbsp;based&nbsp;on&nbsp;distributed&nbsp;CAS&nbsp;operations<br />&nbsp;-&nbsp;a&nbsp;single&nbsp;segment&nbsp;write&nbsp;might&nbsp;trigger&nbsp;up&nbsp;to&nbsp;8&nbsp;different&nbsp;index&nbsp;metadata&nbsp;writes<br />&nbsp;-&nbsp;one&nbsp;out&nbsp;of&nbsp;10&nbsp;(by&nbsp;default,&nbsp;or&nbsp;as&nbsp;configured&nbsp;the&nbsp;merging&nbsp;factor)&nbsp;writes&nbsp;on&nbsp;segment&nbsp;will&nbsp;trigger&nbsp;a&nbsp;rewrite&nbsp;of&nbsp;all&nbsp;segments<br />&nbsp;-&nbsp;load&nbsp;on&nbsp;any&nbsp;IndexReader&nbsp;refresh&nbsp;will&nbsp;increase&nbsp;contention&nbsp;on&nbsp;the&nbsp;above&nbsp;CAS&nbsp;operations<br />&nbsp;-&nbsp;and&nbsp;IndexReader&nbsp;refresh&nbsp;is&nbsp;triggered&nbsp;by&nbsp;visibility&nbsp;of&nbsp;a&nbsp;flush&nbsp;event<br /><br />If&nbsp;you&nbsp;combine&nbsp;the&nbsp;notion&nbsp;of&nbsp;each&nbsp;of&nbsp;these&nbsp;bullet&nbsp;points,&nbsp;it's&nbsp;clear&nbsp;that&nbsp;each&nbsp;increase&nbsp;of&nbsp;{{IndexReader}}&nbsp;refresh&nbsp;operations,&nbsp;and&nbsp;each&nbsp;{{IndexWriter}}&nbsp;commit&nbsp;have&nbsp;an&nbsp;exponential&nbsp;effect&nbsp;on&nbsp;worsening&nbsp;the&nbsp;mount&nbsp;of&nbsp;network&nbsp;traffic&nbsp;and&nbsp;make&nbsp;the&nbsp;CAS&nbsp;operations&nbsp;unlikely&nbsp;to&nbsp;ever&nbsp;spin&nbsp;out.<br />The&nbsp;most&nbsp;important&nbsp;observation&nbsp;is&nbsp;that&nbsp;the&nbsp;{{IndexReader}}&nbsp;refresh&nbsp;operations&nbsp;are&nbsp;affected&nbsp;linearly&nbsp;by&nbsp;the&nbsp;frequency&nbsp;of&nbsp;commits:&nbsp;a&nbsp;refresh&nbsp;is&nbsp;directly&nbsp;caused&nbsp;by&nbsp;a&nbsp;previous&nbsp;commit.&nbsp;So&nbsp;simply&nbsp;controlling&nbsp;the&nbsp;frequency&nbsp;of&nbsp;{{IndexWriter}}&nbsp;commit&nbsp;events&nbsp;will&nbsp;directly&nbsp;control&nbsp;the&nbsp;frequency&nbsp;of&nbsp;{{IndexReader}}&nbsp;refresh&nbsp;operations,&nbsp;and&nbsp;so&nbsp;has&nbsp;the&nbsp;potential&nbsp;to&nbsp;dramatically&nbsp;increase&nbsp;the&nbsp;write&nbsp;throughput&nbsp;on&nbsp;the&nbsp;{{InfinispanDirectoryProvider}}.<br /><br />So&nbsp;the&nbsp;core&nbsp;of&nbsp;the&nbsp;idea&nbsp;here&nbsp;is&nbsp;that&nbsp;for&nbsp;two&nbsp;incoming&nbsp;changesets&nbsp;A&nbsp;and&nbsp;B,&nbsp;incoming&nbsp;on&nbsp;behalf&nbsp;of&nbsp;two&nbsp;parallel&nbsp;user&nbsp;transactions&nbsp;TXA&nbsp;and&nbsp;TXB,&nbsp;normally&nbsp;we&nbsp;would&nbsp;apply&nbsp;this&nbsp;sequence&nbsp;of&nbsp;operations:<br /><br />#&nbsp;TXA&nbsp;enqueues&nbsp;A,&nbsp;and&nbsp;blocks&nbsp;waiting&nbsp;for&nbsp;it.<br />#&nbsp;TXB&nbsp;enqueues&nbsp;B,&nbsp;and&nbsp;blocks&nbsp;waiting&nbsp;for&nbsp;it.<br />#&nbsp;IndexWriter&nbsp;thread&nbsp;takes&nbsp;A&nbsp;from&nbsp;the&nbsp;Queue<br />#&nbsp;IndexWriter&nbsp;thread&nbsp;applies&nbsp;A&nbsp;changes&nbsp;to&nbsp;the&nbsp;index<br />#&nbsp;IndexWriter&nbsp;thread&nbsp;commits&nbsp;and&nbsp;flushes&nbsp;the&nbsp;index<br />#&nbsp;TXA&nbsp;is&nbsp;notified&nbsp;and&nbsp;is&nbsp;unblocked<br />#&nbsp;IndexWriter&nbsp;thread&nbsp;takes&nbsp;B&nbsp;from&nbsp;the&nbsp;Queue<br />#&nbsp;IndexWriter&nbsp;thread&nbsp;applies&nbsp;B&nbsp;changes&nbsp;to&nbsp;the&nbsp;index<br />#&nbsp;IndexWriter&nbsp;thread&nbsp;commits&nbsp;and&nbsp;flushes&nbsp;the&nbsp;index<br />#&nbsp;TXB&nbsp;is&nbsp;notified&nbsp;and&nbsp;is&nbsp;unblocked<br /><br />The&nbsp;above&nbsp;is&nbsp;the&nbsp;current&nbsp;strategy,&nbsp;and&nbsp;releases&nbsp;the&nbsp;waiting&nbsp;threads&nbsp;as&nbsp;soon&nbsp;as&nbsp;possible.<br />Let's&nbsp;assume&nbsp;that&nbsp;each&nbsp;write&nbsp;takes&nbsp;some&nbsp;nanoseconds,&nbsp;and&nbsp;each&nbsp;commit&nbsp;takes&nbsp;200ms;&nbsp;actual&nbsp;figures&nbsp;will&nbsp;vary&nbsp;across&nbsp;systems&nbsp;and&nbsp;configurations&nbsp;but&nbsp;won't&nbsp;be&nbsp;too&nbsp;far&nbsp;from&nbsp;these&nbsp;orders&nbsp;of&nbsp;magnitude;&nbsp;so&nbsp;for&nbsp;the&nbsp;sake&nbsp;of&nbsp;this&nbsp;design&nbsp;we&nbsp;can&nbsp;approximate&nbsp;the&nbsp;cost&nbsp;of&nbsp;each&nbsp;write&nbsp;to&nbsp;nothing,&nbsp;while&nbsp;a&nbsp;commit&nbsp;time&nbsp;is&nbsp;significant.<br /><br />The&nbsp;latency&nbsp;of&nbsp;the&nbsp;above&nbsp;described&nbsp;schema&nbsp;will&nbsp;then&nbsp;be&nbsp;approximately:<br />&nbsp;-&nbsp;TXA&nbsp;will&nbsp;return&nbsp;in&nbsp;1&nbsp;commit&nbsp;(plus&nbsp;a&nbsp;nanosecond)<br />&nbsp;-&nbsp;TXB&nbsp;will&nbsp;return&nbsp;in&nbsp;2&nbsp;commits&nbsp;(plus&nbsp;a&nbsp;couple&nbsp;nanoseconds)<br /><br />If&nbsp;we&nbsp;now&nbsp;reorder&nbsp;the&nbsp;commit&nbsp;sequence&nbsp;to&nbsp;actually&nbsp;perform&nbsp;something&nbsp;like&nbsp;this:<br /><br />#&nbsp;TXA&nbsp;enqueues&nbsp;A,&nbsp;and&nbsp;blocks&nbsp;waiting&nbsp;for&nbsp;it.<br />#&nbsp;TXB&nbsp;enqueues&nbsp;B,&nbsp;and&nbsp;blocks&nbsp;waiting&nbsp;for&nbsp;it.<br />#&nbsp;IndexWriter&nbsp;thread&nbsp;takes&nbsp;A&amp;B&nbsp;from&nbsp;the&nbsp;Queue<br />#&nbsp;IndexWriter&nbsp;thread&nbsp;applies&nbsp;A&amp;B&nbsp;changes&nbsp;to&nbsp;the&nbsp;index&nbsp;(maintaining&nbsp;order)<br />#&nbsp;IndexWriter&nbsp;thread&nbsp;commits&nbsp;and&nbsp;flushes&nbsp;the&nbsp;index<br />#&nbsp;TXA&nbsp;is&nbsp;notified&nbsp;and&nbsp;is&nbsp;unblocked<br />#&nbsp;TXB&nbsp;is&nbsp;notified&nbsp;and&nbsp;is&nbsp;unblocked<br /><br />at&nbsp;this&nbsp;point&nbsp;the&nbsp;measured&nbsp;latency&nbsp;will&nbsp;be:<br />&nbsp;-&nbsp;TXA&nbsp;will&nbsp;return&nbsp;in&nbsp;1&nbsp;commit&nbsp;(plus&nbsp;a&nbsp;couple&nbsp;nanoseconds)<br />&nbsp;-&nbsp;TXB&nbsp;will&nbsp;return&nbsp;in&nbsp;1&nbsp;commit&nbsp;(plus&nbsp;a&nbsp;couple&nbsp;nanoseconds)<br /><br />Compared&nbsp;to&nbsp;the&nbsp;previous&nbsp;results,&nbsp;TXA&nbsp;was&nbsp;delayed&nbsp;by&nbsp;some&nbsp;nanoseconds&nbsp;but&nbsp;the&nbsp;order&nbsp;of&nbsp;magnitude&nbsp;of&nbsp;its&nbsp;response&nbsp;time&nbsp;is&nbsp;not&nbsp;affected.<br />TXB&nbsp;however&nbsp;did&nbsp;cut&nbsp;its&nbsp;waiting&nbsp;time&nbsp;in&nbsp;half..&nbsp;more&nbsp;importantly,&nbsp;it's&nbsp;speed&nbsp;is&nbsp;increased&nbsp;by&nbsp;a&nbsp;factor&nbsp;N&nbsp;where&nbsp;N&nbsp;in&nbsp;this&nbsp;case&nbsp;is&nbsp;2&nbsp;as&nbsp;we&nbsp;have&nbsp;only&nbsp;two&nbsp;transactions&nbsp;writing,&nbsp;but&nbsp;N&nbsp;could&nbsp;be&nbsp;100,&nbsp;you'd&nbsp;have&nbsp;a&nbsp;100X&nbsp;performance&nbsp;improvement.<br /><br />So&nbsp;what's&nbsp;the&nbsp;throughput&nbsp;that&nbsp;we&nbsp;get&nbsp;out&nbsp;of&nbsp;this&nbsp;pattern?<br /><br />What&nbsp;matters&nbsp;most&nbsp;is&nbsp;to&nbsp;cap&nbsp;the&nbsp;_target&nbsp;frequency_&nbsp;of&nbsp;commits&nbsp;to&nbsp;a&nbsp;specific&nbsp;upper&nbsp;bound,&nbsp;and&nbsp;we&nbsp;want&nbsp;to&nbsp;cap&nbsp;this&nbsp;frequency&nbsp;at&nbsp;exactly&nbsp;the&nbsp;maximum&nbsp;throughput&nbsp;that&nbsp;the&nbsp;Infinispan&nbsp;storage&nbsp;can&nbsp;actually&nbsp;take.&nbsp;So&nbsp;if&nbsp;the&nbsp;IndexWriter&nbsp;thread&nbsp;is&nbsp;designed&nbsp;as&nbsp;a&nbsp;busy&nbsp;loop&nbsp;which&nbsp;always&nbsp;takes&nbsp;all&nbsp;of&nbsp;N&nbsp;waiting&nbsp;changesets&nbsp;and&nbsp;applies&nbsp;them,&nbsp;if&nbsp;the&nbsp;commit&nbsp;is&nbsp;slow&nbsp;there&nbsp;will&nbsp;be&nbsp;more&nbsp;changes&nbsp;in&nbsp;the&nbsp;queue&nbsp;waiting&nbsp;for&nbsp;the&nbsp;next&nbsp;iteration&nbsp;of&nbsp;the&nbsp;write&nbsp;loop,&nbsp;making&nbsp;N&nbsp;larger&nbsp;and&nbsp;so&nbsp;scaling&nbsp;up&nbsp;the&nbsp;throughput:&nbsp;the&nbsp;more&nbsp;the&nbsp;storage&nbsp;is&nbsp;slow,&nbsp;the&nbsp;larger&nbsp;the&nbsp;batches.<br /><br />The&nbsp;upper&nbsp;bound</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;">&nbsp;if</span> <span class="diffaddedchars" style="background-color:#ddfade;">&nbsp;is</span> <span class="diffcontext">&nbsp;of&nbsp;course&nbsp;determined&nbsp;by&nbsp;the&nbsp;speed&nbsp;of&nbsp;writes&nbsp;-&nbsp;the&nbsp;ones&nbsp;that&nbsp;we&nbsp;previously&nbsp;considered&nbsp;negligible&nbsp;as&nbsp;they&nbsp;operate&nbsp;in&nbsp;the&nbsp;nanoseconds&nbsp;range;&nbsp;they&nbsp;will</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;">&nbsp;of&nbsp;course</span> <span class="diffcontext">&nbsp;stack&nbsp;up&nbsp;and&nbsp;eventually&nbsp;become&nbsp;the&nbsp;limiting&nbsp;factor.</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;">&nbsp;Also&nbsp;the&nbsp;frequency&nbsp;of&nbsp;commits&nbsp;might&nbsp;tend&nbsp;to&nbsp;zero&nbsp;for&nbsp;very&nbsp;slow&nbsp;stores&nbsp;and&nbsp;we&nbsp;don't&nbsp;want&nbsp;that&nbsp;to&nbsp;happen&nbsp;so&nbsp;the&nbsp;design</span> <span class="diffaddedchars" style="background-color:#ddfade;">&nbsp;The&nbsp;implementation</span> <span class="diffcontext">&nbsp;needs</span> <span class="diffaddedchars" style="background-color:#ddfade;">&nbsp;also</span> <span class="diffcontext">&nbsp;to&nbsp;take&nbsp;into&nbsp;account</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;">&nbsp;also</span> <span class="diffaddedchars" style="background-color:#ddfade;">&nbsp;at&nbsp;least</span> <span class="diffcontext">&nbsp;two</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;">&nbsp;boundaries</span> <span class="diffaddedchars" style="background-color:#ddfade;">&nbsp;exceptional&nbsp;cases</span> <span class="diffcontext">:<br />&nbsp;-&nbsp;what's&nbsp;the&nbsp;IndexWriter&nbsp;loop&nbsp;going&nbsp;to&nbsp;do&nbsp;when&nbsp;no&nbsp;changes&nbsp;are&nbsp;scheduled<br />&nbsp;-&nbsp;do&nbsp;we&nbsp;need&nbsp;to&nbsp;cap&nbsp;the&nbsp;maximum&nbsp;size&nbsp;of&nbsp;batches<br /><br />Ultimately&nbsp;the&nbsp;latency&nbsp;of&nbsp;each&nbsp;user&nbsp;thread&nbsp;is&nbsp;still&nbsp;going&nbsp;to&nbsp;be&nbsp;close&nbsp;to&nbsp;the&nbsp;performance&nbsp;that&nbsp;we&nbsp;can&nbsp;get&nbsp;out&nbsp;of&nbsp;the&nbsp;store&nbsp;to&nbsp;perform&nbsp;a&nbsp;single&nbsp;commit&nbsp;operation,&nbsp;as&nbsp;at&nbsp;least&nbsp;one&nbsp;commit&nbsp;needs&nbsp;to&nbsp;happen&nbsp;before&nbsp;the&nbsp;synchronous&nbsp;user&nbsp;thread&nbsp;is&nbsp;unblocked.&nbsp;The&nbsp;benefit&nbsp;will&nbsp;be&nbsp;that&nbsp;different&nbsp;threads&nbsp;won't&nbsp;&quot;pile&nbsp;up&quot;&nbsp;changes&nbsp;creating&nbsp;larger&nbsp;wait&nbsp;times&nbsp;but&nbsp;the&nbsp;response&nbsp;time&nbsp;is&nbsp;expected&nbsp;to&nbsp;be&nbsp;quite&nbsp;predictable,&nbsp;whatever&nbsp;the&nbsp;load.&nbsp;Systems&nbsp;with&nbsp;an&nbsp;high&nbsp;degree&nbsp;of&nbsp;parallelism&nbsp;will&nbsp;benefit&nbsp;from&nbsp;this.</span> 
                                        </td> 
                                    </tr> 
                                </table> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td class="email-content-main mobile-expand " style="padding: 0px; border-collapse: collapse; border-left: 1px solid #ccc; border-right: 1px solid #ccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #fff"> 
                                <table id="actions-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 1px"> 
                                    <tr> 
                                        <td id="actions-pattern-container" valign="middle" style="padding: 0px; border-collapse: collapse; padding: 10px 0 10px 24px; vertical-align: middle; padding-left: 0"> 
                                            <table align="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
                                                <tr> 
                                                    <td class="actions-pattern-action-icon-container" style="padding: 0px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 0px; vertical-align: middle"> <a href="https://hibernate.atlassian.net/browse/HSEARCH-1699#add-comment" target="_blank" title="Add Comment" style="color: #3b73af; text-decoration: none"> <img class="actions-pattern-action-icon-image" src="cid:jira-generated-image-static-comment-icon-d4dfad6b-ac1c-4c0a-8e7e-8312c210d31c" alt="Add Comment" title="Add Comment" height="16" width="16" border="0" style="vertical-align: middle" /> </a> 
                                                    </td> 
                                                    <td class="actions-pattern-action-text-container" style="padding: 0px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 4px; padding-left: 5px"> <a href="https://hibernate.atlassian.net/browse/HSEARCH-1699#add-comment" target="_blank" title="Add Comment" style="color: #3b73af; text-decoration: none">Add Comment</a> 
                                                    </td> 
                                                </tr> 
                                            </table> 
                                        </td> 
                                    </tr> 
                                </table> 
                            </td> 
                        </tr> 
                        <!-- there needs to be content in the cell for it to render in some clients --> 
                        <tr> 
                            <td class="email-content-rounded-bottom mobile-expand" style="padding: 0px; border-collapse: collapse; color: #fff; padding: 0 15px 0 16px; height: 5px; line-height: 5px; background-color: #fff; border-top: 0; border-left: 1px solid #ccc; border-bottom: 1px solid #ccc; border-right: 1px solid #ccc; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; mso-line-height-rule: exactly">
                                &nbsp;
                            </td> 
                        </tr> 
                    </table> 
                </td> 
            </tr> 
            <tr> 
                <td id="footer-pattern" style="padding: 0px; border-collapse: collapse; padding: 12px 20px"> 
                    <table id="footer-pattern-container" cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
                        <tr> 
                            <td id="footer-pattern-text" class="mobile-resize-text" width="100%" style="padding: 0px; border-collapse: collapse; color: #999; font-size: 12px; line-height: 18px; font-family: Arial, sans-serif; mso-line-height-rule: exactly; mso-text-raise: 2px">
                                 This message was sent by Atlassian JIRA <span id="footer-build-information">(v6.4-OD-07-004#64005-<span title="29a0beaca7c693975974e1d5d9f869ecb60599fc" data-commit-id="29a0beaca7c693975974e1d5d9f869ecb60599fc}">sha1:29a0bea</span>)</span> 
                            </td> 
                            <td id="footer-pattern-logo-desktop-container" valign="top" style="padding: 0px; border-collapse: collapse; padding-left: 20px; vertical-align: top"> 
                                <table style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
                                    <tr> 
                                        <td id="footer-pattern-logo-desktop-padding" style="padding: 0px; border-collapse: collapse; padding-top: 3px"> <img id="footer-pattern-logo-desktop" src="cid:jira-generated-image-static-footer-desktop-logo-4393208a-a6f6-4f54-85dc-ed34aec33523" alt="Atlassian logo" title="Atlassian logo" width="169" height="36" class="image_fix" /> 
                                        </td> 
                                    </tr> 
                                </table> 
                            </td> 
                        </tr> 
                    </table> 
                </td> 
            </tr> 
        </table>   
    </body>
</html>