<p>Matthew Fredrickson <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/9270">View Change</a></p><p>Patch set 3:</p><p>(9 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/9270/3/main/cdr.c">File main/cdr.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/9270/3/main/cdr.c@3787">Patch Set #3, Line 3787:</a> <code style="font-family:monospace,monospace"> int nextms = 0;</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">No need to initialize nextms. You always initialize it below.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/9270/3/main/cdr.c@3796">Patch Set #3, Line 3796:</a> <code style="font-family:monospace,monospace"> /* manually reschedule from this point in time */</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Comment isn't quite right anymore. How about:</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/9270/3/main/cdr.c@3799">Patch Set #3, Line 3799:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;"> if (!nextms) {<br> /* I hate doing this, but previously if you set the batch time to 0, it would continuously<br> resubmit batches to the scheduler. IMHO that seems buggy, but I'd rather not break it<br> if someone was relying on that behavior */<br> nextms = 1;<br> }<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I'd say it is buggy. All they are doing is needlessly loading their CPU wh</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Ok, I'll drop this code then and fix it in parse_config()</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/9270/3/main/cdr.c@3807">Patch Set #3, Line 3807:</a> <code style="font-family:monospace,monospace"> /* returning zero so the scheduler does not automatically reschedule */</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">This comment is not needed anymore as you never return zero now.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/9270/3/main/cdr.c@3884">Patch Set #3, Line 3884:</a> <code style="font-family:monospace,monospace"> /* Don't call start_batch with cdr_batch_lock held */</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">s/call start_batch/submit a batch/</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/9270/3/main/cdr.c@3899">Patch Set #3, Line 3899:</a> <code style="font-family:monospace,monospace"> /* this only can happen if someone sets there batch time to 0 or does 'cdr submit' from the CLI back to back quickly */</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Restore the previous comment as there will normally not be an empty schedul</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/9270/3/main/cdr.c@3910">Patch Set #3, Line 3910:</a> <code style="font-family:monospace,monospace"> ast_debug(2, "Processed %d scheduled CDR batches from the run queue\n", numevents);</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">This debug msg isn't quite right.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Not part of my original diff, but I can fix regardless.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/9270/3/main/cdr.c@4410">Patch Set #3, Line 4410:</a> <code style="font-family:monospace,monospace"> SCOPED_LOCK(batch, &cdr_batch_lock, ast_mutex_lock, ast_mutex_unlock);</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">This scoped lock can cause a deadlock when you call start_batch_mode().</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I agree. Removed the scoped lock.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/9270/3/main/cdr.c@4424">Patch Set #3, Line 4424:</a> <code style="font-family:monospace,monospace"> /* Kill the currently scheduled item */</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">This comment needs to be removed.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/9270">change 9270</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/9270"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I6333e865db7c593c102c2fd948cecdb96481974d </div>
<div style="display:none"> Gerrit-Change-Number: 9270 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Matthew Fredrickson <creslin@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Matthew Fredrickson <creslin@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 27 Jun 2018 09:05:53 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>