<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 21, 2014 at 11:22 AM, Ivan Čukić <span dir="ltr"><<a href="mailto:ivan.cukic@kde.org" target="_blank">ivan.cukic@kde.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">One thing to ask here is if baloo skips indexing a file that is in an <br>indexable folder - does it store any info about the file (name, date etc.) or <br>not?<br></div></blockquote><div><br></div><div>No. It does store any info. </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Still, baloo is not off the hook - if we want to detect the file moving and <br>deletion (as suggested by the guy behind baloo :P), at least for the indexed <br>files, we need baloo to somehow tell us what was moved/deleted.<br><br>This could be implemented in a few different ways that would all have some <br>drawbacks:<br>1 - baloo sending signals - big drawback would be that if the clients miss out <br>an event, the database would become inconsistent;<br>2 - saving baloo ids along files in kamd - drawback is that baloo becomes tied <br>to sqlite (as you mentioned);<br>3 - baloo saving information about what has moved/deleted so that a client can <br>ask for all events that happened since some timestamp - drawbacks here are <br>that the clients need to regularly check for the updates meaning they will <br>most likely have at least a bit out of date information<br></div></blockquote><div><br></div><div>The NTFS file system has something similar. It's called a USN Journal. It's their solution to applications being able to see what changed when they weren't running or if they missed some events.</div><div><br></div><div>I'm not too keen on Baloo doing stuff like this, but we can make something new which does stuff like this, and (possibly) make Baloo use it.</div><div><br></div><div>I looked into the BTRFS file system about a month ago, and we could hypothetically use its snapshot feature to know what has changed since a particular time interval. Currently btfs-send, sending both the data and the metadata, but that can be improved. I'm not saying that we make btrfs a dependency for Plasma, I'm just throwing ideas out there which was can use IF the user is on btrfs.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">4 - combination of 1 and 3 - it would be the most complex implementation, but <br>it would work properly (distributed dbs are evil )<br><br>And, an additional problem is what to do about the files that are not indexed <br>by baloo? Should it silently fail or what? For the statistics, it would be <br>(imo) ok to fail silently, but for activity linking, it might be nice to show <br>a warning message to the user.</div></blockquote></div><div class="gmail_extra"><br></div>Be careful here.</div><div class="gmail_extra"><br></div><div class="gmail_extra">* Silently failing is not always a good idea</div><div class="gmail_extra">* Making file Indexing mandatory for statistics also seems a little bit risky. <br><div><br></div>-- <br><span style="color:rgb(192,192,192)">Vishesh Handa</span><br>
</div></div>