<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="http://git.reviewboard.kde.org/r/103794/">http://git.reviewboard.kde.org/r/103794/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On January 26th, 2012, 7:32 p.m., <b>Sebastian Trueg</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Thanks to quickgit not doing what it should here is a copy of the commit message which explains why your review request sadly needs to go to the bin:

commit 25ce125c5bf43fe0a44ca5797a8234ad4398d6b8
Author: Sebastian Trueg <trueg@kde.org>
Date:   Tue Oct 18 11:41:13 2011 +0200

    Always re-index files on close after write events.
    
    This is required since mmapped files do not create modification events
    while being written.</pre>
 </blockquote>




 <p>On January 26th, 2012, 7:39 p.m., <b>Vishesh Handa</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">So, that's an inotify bug. It should be fixed over there.

I don't see why we should have unnecessary re-indexing cause of that. It's extremely irritating if I'm seeding a lot of files.</pre>
 </blockquote>





 <p>On January 26th, 2012, 7:58 p.m., <b>Sebastian Trueg</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Whether the bug is in inotify or somewhere else does not matter. The fact is that ktorrent uses mmapped files. Thus, already for that use case we need to stick to the current solution. Also nothing should be re-indexed as nothing changed. The only thing that would happen is that the file indexer checks if it needs to re-index the file. Also there is some compression of those close write events. If its not enough we can raise the timeout.</pre>
 </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">What about Amarok? Why should the files be reindexed when the track on the playlist changes?

It will be reindexed as the CloseOnWrite tells the file indexer to index it. The option is to obviously check the sha1sum of the file before indexing it, but that's a lot of effort .. or we could check the modification date, since that shouldn't have changed. What do you think?

And btw, what does ktorrent use memory mapped files for?</pre>
<br />








<p>- Vishesh</p>


<br />
<p>On January 26th, 2012, 12:41 p.m., Vishesh Handa wrote:</p>






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

<div>Review request for Nepomuk, Alex Fiestas and Sebastian Trueg.</div>
<div>By Vishesh Handa.</div>


<p style="color: grey;"><i>Updated Jan. 26, 2012, 12:41 p.m.</i></p>






<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;">This Filewatcher sends files for reindexing when it receives a WriteOnClose event from inotify. This event is generated whenever a file opened in write mode is closed. Even if they were no changes.

Programs like Amarok and KTorrent often open the files in write mode even when they don't make any changes. Which results in reindexing of those files.

For a graphical example - http://www.afiestas.org/nepomukReindexing.ogv</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;">All the tests pass, and files are no longer reindexed when the song changes in Amarok.</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>nepomuk/services/filewatch/activefilequeue.h <span style="color: grey">(19d4813)</span></li>

 <li>nepomuk/services/filewatch/activefilequeue.cpp <span style="color: grey">(8bb54ed)</span></li>

 <li>nepomuk/services/filewatch/nepomukfilewatch.h <span style="color: grey">(cfb02fc)</span></li>

 <li>nepomuk/services/filewatch/nepomukfilewatch.cpp <span style="color: grey">(60550c2)</span></li>

 <li>nepomuk/services/filewatch/test/activefilequeuetest.cpp <span style="color: grey">(0445e8f)</span></li>

</ul>

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




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








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