[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Review Request 114981: Rework slotScheduleIndexing a bit to fix some corner cases
From:       "Simeon Bird" <bladud () gmail ! com>
Date:       2014-01-13 22:16:56
Message-ID: 20140113221656.8796.44941 () probe ! kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/114981/
-----------------------------------------------------------

(Updated Jan. 13, 2014, 10:16 p.m.)


Status
------

This change has been marked as submitted.


Review request for Baloo and Vishesh Handa.


Repository: baloo


Description
-------

Rework slotScheduleIndexing so that it is clearer when each queue runs, 
and fix a few corner case bugs where the queues would run or not run in the wrong \
places.

Then fix a few strange things that turn up when I do this; the IndexCleaner stuff is \
a bit pointless,  because the IndexCleaner does nothing right now.

commit be744870904645be78f50bd51b186805e8c902ed
Author: Simeon Bird <bladud@gmail.com>
Date:   Sat Jan 11 16:25:51 2014 -0500

    Fix up the IndexCleaner so that it starts suspended, then set resume to
    just emitResult and finish instantly. This stops the cleaner hanging
    forever, as it did previously.
    
    Also we don't need m_suspended as that is handled by the parent KJob
    class.

commit e8aa2268601ee40296bf120385e0506bfc6241b9
Author: Simeon Bird <bladud@gmail.com>
Date:   Sat Jan 11 18:02:38 2014 -0500

    Make it safe to call resume on an empty queue by not doing callForNextIteration \
when the queue is empty

commit e8d46a4517fe21a5382fdb21f61eed90f15b53af
Author: Simeon Bird <bladud@gmail.com>
Date:   Sat Jan 11 17:59:23 2014 -0500

    Don't call resume on an empty queue.
    
    This leads to a call loop:
    resume->callForNextIteration->finishedIndexing
    ->slotFinishedIndexing-> slotScheduleIndexing-> resume

commit 96622c959f5dfd84df772a151a63df7d02ba9992
Author: Simeon Bird <bladud@gmail.com>
Date:   Sat Jan 11 14:16:45 2014 -0500

    Refactor slotScheduleIndexing to make it clearer when each queue runs.
    
    Along the way, fix a couple of odd edge cases:
    1. The file queue would sometimes not be started correctly
    2. The cleaner would stop when going onto battery, but if we
       were already on battery when starting, it would still be started.
       Change this so the cleaner runs even when on battery.
    
    Also make some adjustments to the index cleaner so that it works when
    resumed: these are only necessary because it is not yet implemented.


Diffs
-----

  src/file/indexcleaner.h 7d68ebf 
  src/file/indexcleaner.cpp 685a675 
  src/file/indexingqueue.cpp ca2abc3 
  src/file/indexscheduler.h 015d23a 
  src/file/indexscheduler.cpp 79cd5bf 

Diff: https://git.reviewboard.kde.org/r/114981/diff/


Testing
-------

Compiled, ran with it a bit. Some of the edge cases are fixed now.


Thanks,

Simeon Bird


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/114981/">https://git.reviewboard.kde.org/r/114981/</a>
  </td>
    </tr>
   </table>
   <br />



<table bgcolor="#e0e0e0" width="100%" cellpadding="8" style="border: 1px gray \
solid;">  <tr>
  <td>
   <h1 style="margin-right: 0.2em; padding: 0; font-size: 10pt;">This change has been \
marked as submitted.</h1>  </td>
 </tr>
</table>
<br />


<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for Baloo and Vishesh Handa.</div>
<div>By Simeon Bird.</div>


<p style="color: grey;"><i>Updated Jan. 13, 2014, 10:16 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
baloo
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Rework slotScheduleIndexing so that it is clearer when each queue runs,  \
and fix a few corner case bugs where the queues would run or not run in the wrong \
places.

Then fix a few strange things that turn up when I do this; the IndexCleaner stuff is \
a bit pointless,  because the IndexCleaner does nothing right now.

commit be744870904645be78f50bd51b186805e8c902ed
Author: Simeon Bird &lt;bladud@gmail.com&gt;
Date:   Sat Jan 11 16:25:51 2014 -0500

    Fix up the IndexCleaner so that it starts suspended, then set resume to
    just emitResult and finish instantly. This stops the cleaner hanging
    forever, as it did previously.
    
    Also we don&#39;t need m_suspended as that is handled by the parent KJob
    class.

commit e8aa2268601ee40296bf120385e0506bfc6241b9
Author: Simeon Bird &lt;bladud@gmail.com&gt;
Date:   Sat Jan 11 18:02:38 2014 -0500

    Make it safe to call resume on an empty queue by not doing callForNextIteration \
when the queue is empty

commit e8d46a4517fe21a5382fdb21f61eed90f15b53af
Author: Simeon Bird &lt;bladud@gmail.com&gt;
Date:   Sat Jan 11 17:59:23 2014 -0500

    Don&#39;t call resume on an empty queue.
    
    This leads to a call loop:
    resume-&gt;callForNextIteration-&gt;finishedIndexing
    -&gt;slotFinishedIndexing-&gt; slotScheduleIndexing-&gt; resume

commit 96622c959f5dfd84df772a151a63df7d02ba9992
Author: Simeon Bird &lt;bladud@gmail.com&gt;
Date:   Sat Jan 11 14:16:45 2014 -0500

    Refactor slotScheduleIndexing to make it clearer when each queue runs.
    
    Along the way, fix a couple of odd edge cases:
    1. The file queue would sometimes not be started correctly
    2. The cleaner would stop when going onto battery, but if we
       were already on battery when starting, it would still be started.
       Change this so the cleaner runs even when on battery.
    
    Also make some adjustments to the index cleaner so that it works when
    resumed: these are only necessary because it is not yet implemented.
</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Compiled, ran with it a bit. Some of the edge cases are fixed now.</pre> \
</td>  </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>src/file/indexcleaner.h <span style="color: grey">(7d68ebf)</span></li>

 <li>src/file/indexcleaner.cpp <span style="color: grey">(685a675)</span></li>

 <li>src/file/indexingqueue.cpp <span style="color: grey">(ca2abc3)</span></li>

 <li>src/file/indexscheduler.h <span style="color: grey">(015d23a)</span></li>

 <li>src/file/indexscheduler.cpp <span style="color: grey">(79cd5bf)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/114981/diff/" style="margin-left: \
3em;">View Diff</a></p>







  </td>
 </tr>
</table>




  </div>
 </body>
</html>



>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic