--===============6577383129464175830== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On Sept. 11, 2016, 4:50 p.m., Boudhayan Gupta wrote: > > src/engine/database.cpp, line 107 > > > > > > This is clever, but I had to read it thrice to figure out what exactly it does. Maybe use this: > > > > ``` > > ((sizeof(size_t) == 4) ? 1 : 256) * size_t(1024 * 1024 * 1024) > > ``` > > > > Seems more readable to me - the significant digits of the size followed by the multiplier. > > > > If there's a performance or strictness issue I'm not seeing, please tell me. > > Boudhayan Gupta wrote: > Err, could you also calculate the effective size in a const on the line above? Sorry about the nitpick, I just want readability. done + submitted performance doesn't matter at all, this is done once and only arithmetics, who cares ;=) - Christoph ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/128885/#review99096 ----------------------------------------------------------- On Sept. 11, 2016, 4:58 p.m., Christoph Cullmann wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/128885/ > ----------------------------------------------------------- > > (Updated Sept. 11, 2016, 4:58 p.m.) > > > Review request for KDE Frameworks, Boudhayan Gupta, David Faure, and Pinak Ahuja. > > > Repository: baloo > > > Description > ------- > > Increase size limit of baloo index for 64-bit machines to avoid crashs after > 5GB of index size. > (Better would be additional out-of-space handling, but ATM baloo has zero checks for that) > > The size limit for 32-bit is still 1GB, like before (there was a silent overflow from 5GB to 1GB in the computation), people with large homes will still get random segfaults on 32-bit. > > Patch based on patch from Hao Zhang, Bug 364475 > https://bugs.kde.org/show_bug.cgi?id=364475 > > > Diffs > ----- > > src/engine/database.cpp 89e2e03 > src/engine/databasesize.h aa180fb > src/engine/transaction.cpp 0af20be > src/tools/balooctl/statuscommand.cpp 73289c4 > > Diff: https://git.reviewboard.kde.org/r/128885/diff/ > > > Testing > ------- > > > Thanks, > > Christoph Cullmann > > --===============6577383129464175830== MIME-Version: 1.0 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 7bit
This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/128885/

On September 11th, 2016, 4:50 p.m. UTC, Boudhayan Gupta wrote:

src/engine/database.cpp (Diff revision 1)
106
    mdb_env_set_mapsize(m_env, size_t(1024) * size_t(1024) * size_t(1024) * size_t((sizeof(size_t) == 4) ? 1 : 256));

This is clever, but I had to read it thrice to figure out what exactly it does. Maybe use this:

((sizeof(size_t) == 4) ? 1 : 256) * size_t(1024 * 1024 * 1024)

Seems more readable to me - the significant digits of the size followed by the multiplier.

If there's a performance or strictness issue I'm not seeing, please tell me.

On September 11th, 2016, 4:53 p.m. UTC, Boudhayan Gupta wrote:

Err, could you also calculate the effective size in a const on the line above? Sorry about the nitpick, I just want readability.

done + submitted performance doesn't matter at all, this is done once and only arithmetics, who cares ;=)


- Christoph


On September 11th, 2016, 4:58 p.m. UTC, Christoph Cullmann wrote:

Review request for KDE Frameworks, Boudhayan Gupta, David Faure, and Pinak Ahuja.
By Christoph Cullmann.

Updated Sept. 11, 2016, 4:58 p.m.

Repository: baloo

Description

Increase size limit of baloo index for 64-bit machines to avoid crashs after > 5GB of index size. (Better would be additional out-of-space handling, but ATM baloo has zero checks for that)

The size limit for 32-bit is still 1GB, like before (there was a silent overflow from 5GB to 1GB in the computation), people with large homes will still get random segfaults on 32-bit.

Patch based on patch from Hao Zhang, Bug 364475 https://bugs.kde.org/show_bug.cgi?id=364475

Diffs

  • src/engine/database.cpp (89e2e03)
  • src/engine/databasesize.h (aa180fb)
  • src/engine/transaction.cpp (0af20be)
  • src/tools/balooctl/statuscommand.cpp (73289c4)

View Diff

--===============6577383129464175830==--