<table><tr><td style="">michaelh created this revision.<br />michaelh added reviewers: Baloo, Frameworks.<br />Restricted Application added projects: Frameworks, Baloo.<br />michaelh requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D11753">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Remove stale entries from database</p>
<p>This is mostly based on <a href="https://phabricator.kde.org/D11529" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">D11529</a></p></div></div><br /><div><strong>TEST PLAN</strong><div><div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="console" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);"><span style="color: #000080">$ baloodb clean --mounted-only </span>
<span style="color: #808080">Removing stale database contents...</span>
<span style="color: #808080">Ignoring device 2086 </span>
<span style="color: #808080">Ignoring device 2098</span>
<span style="color: #808080">Ignoring device 2069</span>
<span style="color: #808080">Ignoring device 2064</span>
<span style="color: #808080">Ignoring device 2066</span>
<span style="color: #808080">Database has corrupted entries baloo may misbehave, please recreate the DB by running $ balooctl disable && balooctl enable</span>
<span style="color: #808080">Removing: device: 2049 inode: 4861 url: /tmp/otto</span>
<span style="color: #808080">...</span>
<span style="color: #808080"></span>
<span style="color: #808080">Removing: device: 2053 inode: 39208001 url: //Little Witch Academia - 08.mkv</span>
<span style="color: #808080">Removing: device: 2053 inode: 39215245 url: </span>
<span style="color: #808080">Removed 14965 items</span>
<span style="color: #808080">Elapsed: 4.6921 secs</span></pre></div>
<p>Second run:</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="console" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);"><span style="color: #000080">$ baloodb clean --mounted-only </span>
<span style="color: #808080">Removing stale database contents...</span>
<span style="color: #808080">access filter QFlags(0x4)</span>
<span style="color: #808080">Ignoring device 2086 </span>
<span style="color: #808080">Ignoring device 2098</span>
<span style="color: #808080">Ignoring device 2066</span>
<span style="color: #808080">Ignoring device 2064</span>
<span style="color: #808080">Ignoring device 2069</span>
<span style="color: #808080">Removing: device: 22 inode: 225383 url: </span>
<span style="color: #808080">Removing: device: 2053 inode: 34612126 url: </span>
<span style="color: #808080">Removed 14943 items</span>
<span style="color: #808080">Elapsed: 3.47939 secs</span></pre></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R293 Baloo</div></div></div><br /><div><strong>BRANCH</strong><div><div>sanitize-clean (branched from master)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D11753">https://phabricator.kde.org/D11753</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/engine/databasesanitizer.cpp<br />
src/engine/databasesanitizer.h<br />
src/engine/documenturldb.h<br />
src/tools/baloodb/main.cpp</div></div></div><br /><div><strong>To: </strong>michaelh, Baloo, Frameworks<br /><strong>Cc: </strong>smithjd, ashaposhnikov, michaelh, astippich, spoorun, nicolasfella, ngraham, alexeymin<br /></div>