Joost Hopmans e683db244e Merge pull request #639 in KC/kopanocore from ~BSIMONSEN/kopanocore:kc5-sqllimit to master il y a 7 ans
..
include 0f1c330ea3 libserver: use initialization and in-class defaults il y a 8 ans
ECABObjectTable.cpp 6f49c71215 libserver: gracefully handle allocation failures il y a 8 ans
ECABObjectTable.h 2d60ab3890 treewide: place all symbols into a namespace il y a 8 ans
ECAttachmentStorage.cpp 272325e3c4 libserver: add further LIMIT clauses to SELECT statements il y a 7 ans
ECAttachmentStorage.h 0f1c330ea3 libserver: use initialization and in-class defaults il y a 8 ans
ECCacheManager.cpp 272325e3c4 libserver: add further LIMIT clauses to SELECT statements il y a 7 ans
ECCacheManager.h 52d0f950fc libserver: use move semantics for ECsIndexProp il y a 8 ans
ECConvenientDepthABObjectTable.cpp 6f49c71215 libserver: gracefully handle allocation failures il y a 8 ans
ECConvenientDepthABObjectTable.h 20e9ee58b0 libserver: repair type punning il y a 8 ans
ECConvenientDepthObjectTable.cpp 6f49c71215 libserver: gracefully handle allocation failures il y a 8 ans
ECConvenientDepthObjectTable.h 20e9ee58b0 libserver: repair type punning il y a 8 ans
ECConversion.cpp a55d10f351 provider: consistent use of s_alloc/s_free (3/6) il y a 8 ans
ECConversion.h 2d60ab3890 treewide: place all symbols into a namespace il y a 8 ans
ECDBDef.h f5807d31ad libserver: let PRI keys not be NULL il y a 8 ans
ECDatabase.h 08d8fc957d libserver: set default class member values il y a 8 ans
ECDatabaseFactory.cpp be6f6599ce libserver: replace ECDatabaseMySQL name by ECDatabase il y a 8 ans
ECDatabaseFactory.h 2d60ab3890 treewide: place all symbols into a namespace il y a 8 ans
ECDatabaseMySQL.cpp dbda3275c1 Merge pull request #630 in KC/kopanocore from ~BSIMONSEN/kopanocore:use-autocommit-0-where-possible to master il y a 7 ans
ECDatabaseUpdate.cpp b1afdf7ee7 libserver: simplify small functions to be even smaller il y a 8 ans
ECDatabaseUpdate.h 2d60ab3890 treewide: place all symbols into a namespace il y a 8 ans
ECDatabaseUtils.cpp f160ba86a2 treewide: simplify small functions to be even smaller il y a 8 ans
ECDatabaseUtils.h f88f537775 treewide: drop redundant access control specifiers il y a 8 ans
ECGenProps.cpp 272325e3c4 libserver: add further LIMIT clauses to SELECT statements il y a 7 ans
ECGenProps.h 355bdaf00a libserver: drop useless access specifier in class ECGenProps il y a 8 ans
ECGenericObjectTable.cpp 4f6090e0b6 Merge branch 'release' il y a 8 ans
ECGenericObjectTable.h f88f537775 treewide: drop redundant access control specifiers il y a 8 ans
ECICS.cpp 272325e3c4 libserver: add further LIMIT clauses to SELECT statements il y a 7 ans
ECICS.h 6e15c6f498 libserver: remove unused function CleanupChangesTable il y a 8 ans
ECICSHelpers.cpp 6f49c71215 libserver: gracefully handle allocation failures il y a 8 ans
ECICSHelpers.h f88f537775 treewide: drop redundant access control specifiers il y a 8 ans
ECIndexer.cpp d4e9ba8d0f provider: consistent use of s_alloc/s_free (4/6) il y a 8 ans
ECIndexer.h 2d60ab3890 treewide: place all symbols into a namespace il y a 8 ans
ECKrbAuth.cpp 2d60ab3890 treewide: place all symbols into a namespace il y a 8 ans
ECKrbAuth.h 2d60ab3890 treewide: place all symbols into a namespace il y a 8 ans
ECLockManager.cpp 85f8454abc libserver: use shared_mutex class in ECLockManager il y a 8 ans
ECLockManager.h 85f8454abc libserver: use shared_mutex class in ECLockManager il y a 8 ans
ECMAPI.h 2a5437fbcc Initial commit il y a 8 ans
ECMailBoxTable.cpp 6f49c71215 libserver: gracefully handle allocation failures il y a 8 ans
ECMailBoxTable.h 2d60ab3890 treewide: place all symbols into a namespace il y a 8 ans
ECMultiStoreTable.cpp 6f49c71215 libserver: gracefully handle allocation failures il y a 8 ans
ECMultiStoreTable.h 2d60ab3890 treewide: place all symbols into a namespace il y a 8 ans
ECNotification.cpp 2f624c0389 provider: consistent use of s_alloc/s_free (5/6) il y a 8 ans
ECNotification.h 2d60ab3890 treewide: place all symbols into a namespace il y a 8 ans
ECNotificationManager.cpp f160ba86a2 treewide: simplify small functions to be even smaller il y a 8 ans
ECNotificationManager.h 0f1c330ea3 libserver: use initialization and in-class defaults il y a 8 ans
ECPamAuth.cpp 3166997125 treewide: replace type repetitions by "auto" in casting statements il y a 8 ans
ECPamAuth.h 2d60ab3890 treewide: place all symbols into a namespace il y a 8 ans
ECPluginFactory.cpp 0f1c330ea3 libserver: use initialization and in-class defaults il y a 8 ans
ECPluginFactory.h 0f1c330ea3 libserver: use initialization and in-class defaults il y a 8 ans
ECPluginSharedData.cpp 0f1c330ea3 libserver: use initialization and in-class defaults il y a 8 ans
ECS3Attachment.cpp 64c316f15e treewide: promote some reinterpret_cast to static_cast il y a 8 ans
ECS3Attachment.h 0f1c330ea3 libserver: use initialization and in-class defaults il y a 8 ans
ECSearchFolders.cpp 272325e3c4 libserver: add further LIMIT clauses to SELECT statements il y a 7 ans
ECSearchFolders.h 0f1c330ea3 libserver: use initialization and in-class defaults il y a 8 ans
ECSearchObjectTable.cpp 6f49c71215 libserver: gracefully handle allocation failures il y a 8 ans
ECSearchObjectTable.h 20e9ee58b0 libserver: repair type punning il y a 8 ans
ECSecurity.cpp f160ba86a2 treewide: simplify small functions to be even smaller il y a 8 ans
ECSecurity.h 2d60ab3890 treewide: place all symbols into a namespace il y a 8 ans
ECServerEntrypoint.cpp 056ecbba15 provider: stash SOAPINFO casting into separate function il y a 8 ans
ECServerEntrypoint.h 056ecbba15 provider: stash SOAPINFO casting into separate function il y a 8 ans
ECSession.cpp f62d03393f libserver: replace "select" by "poll" il y a 8 ans
ECSession.h 0f1c330ea3 libserver: use initialization and in-class defaults il y a 8 ans
ECSessionGroup.cpp 91e75f76e3 provider: consistent use of s_alloc/s_free (6/6) il y a 8 ans
ECSessionGroup.h b22f293ecd build: resolve some clang warnings il y a 8 ans
ECSessionManager.cpp 3166997125 treewide: replace type repetitions by "auto" in casting statements il y a 8 ans
ECSessionManager.h 427df3e8f7 libserver: use shared_mutex class in ECSessionManager il y a 8 ans
ECStatsCollector.cpp 2d60ab3890 treewide: place all symbols into a namespace il y a 8 ans
ECStatsCollector.h 2d60ab3890 treewide: place all symbols into a namespace il y a 8 ans
ECStatsTables.cpp 6f49c71215 libserver: gracefully handle allocation failures il y a 8 ans
ECStatsTables.h 20e9ee58b0 libserver: repair type punning il y a 8 ans
ECStoreObjectTable.cpp b50bc6f8f5 libserver: reduce nesting level in source il y a 8 ans
ECStoreObjectTable.h 0f1c330ea3 libserver: use initialization and in-class defaults il y a 8 ans
ECStringCompat.cpp e13c166ef4 treewide: deindent case label statements (6/7) il y a 8 ans
ECStringCompat.h 2d60ab3890 treewide: place all symbols into a namespace il y a 8 ans
ECSubRestriction.cpp 1308066560 libserver: release SQL result from ~DB_RESULT il y a 8 ans
ECSubRestriction.h 2d60ab3890 treewide: place all symbols into a namespace il y a 8 ans
ECTPropsPurge.cpp f160ba86a2 treewide: simplify small functions to be even smaller il y a 8 ans
ECTPropsPurge.h 0f1c330ea3 libserver: use initialization and in-class defaults il y a 8 ans
ECTableManager.cpp 6f49c71215 libserver: gracefully handle allocation failures il y a 8 ans
ECTableManager.h 0f1c330ea3 libserver: use initialization and in-class defaults il y a 8 ans
ECTestProtocol.cpp 2d60ab3890 treewide: place all symbols into a namespace il y a 8 ans
ECTestProtocol.h 2d60ab3890 treewide: place all symbols into a namespace il y a 8 ans
ECUserManagement.cpp b50bc6f8f5 libserver: reduce nesting level in source il y a 8 ans
ECUserManagement.h 1b08d97d15 build: work around gcc 4.7 dtor behavior il y a 8 ans
ECUserStoreTable.cpp 6f49c71215 libserver: gracefully handle allocation failures il y a 8 ans
ECUserStoreTable.h 2d60ab3890 treewide: place all symbols into a namespace il y a 8 ans
README.md 0d3875268e doc: update code structure documentation il y a 8 ans
StorageUtil.cpp 272325e3c4 libserver: add further LIMIT clauses to SELECT statements il y a 7 ans
StorageUtil.h 2d60ab3890 treewide: place all symbols into a namespace il y a 8 ans
StreamUtil.cpp e9b4fdd12e Merge KC-PR-631 il y a 7 ans
StreamUtil.h a50ba602ac misc: add static/const qualifiers for functions and data il y a 8 ans
cmd.cpp 272325e3c4 libserver: add further LIMIT clauses to SELECT statements il y a 7 ans
cmd.hpp 2d60ab3890 treewide: place all symbols into a namespace il y a 8 ans
cmdutil.cpp 272325e3c4 libserver: add further LIMIT clauses to SELECT statements il y a 7 ans
cmdutil.hpp 26dffb479b build: ensure exception includes are present il y a 8 ans
logontime.cpp 272325e3c4 libserver: add further LIMIT clauses to SELECT statements il y a 7 ans
logontime.hpp 2d60ab3890 treewide: place all symbols into a namespace il y a 8 ans

README.md

Libserver

ECCacheManager

The ECCacheManager caches some specific MySQL table items in a hash map. For example for the hierarchtable it is stored as . When the cache limit is hit, we randomly remove 5% of the items.

The sort() operation on unordered hashmaps is very expensive so you might notice cache spikes everytime the cache is cleaned. A possible solution is randomly removing the cache entries.

         +-------------------------------------------------------------+
         |                                                             |
         |                                                             |
cache --+|                  xxxxxxxx xxxxxxxx xxxxxxxxxx xxxxxxxxxxxxxx|
limit    |               xxx       x x      x x        x x             |
         |            xxxx          x        x          x              |
         |         xxxx                                                |
         |        xx                                                   |
         |     xxx                                                     |
         |  xxxx                                                       |
         |xxx                                                          |
         xx------------------------------------------------------------+