summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2016-05-18 14:30:28 +0200
committerJakub Hrozek <jhrozek@redhat.com>2016-06-23 13:40:11 +0200
commitdd285415d7a8d8376207960cfa3e977524c3b98c (patch)
tree38d848dcdc43045ef5d781665b0a28bf85bffd7b /src/util
parent13d7df10bf4d76c333a9169f9fcbeb891d870351 (diff)
downloadsssd-dd285415d7a8d8376207960cfa3e977524c3b98c.tar.gz
sssd-dd285415d7a8d8376207960cfa3e977524c3b98c.tar.xz
sssd-dd285415d7a8d8376207960cfa3e977524c3b98c.zip
SYSDB: Search the timestamp caches in addition to the sysdb cache
When a sysdb entry is searched, the sysdb cache is consulted first for users or groups. If an entry is found in the sysdb cache, the attributes from the timestamp cache are merged to return the full and up-to-date set of attributes. The merging is done with a single BASE search which is a direct lookup into the underlying key-value database, so it should be relatively fast. More complex merging is done only for enumeration by filter which is currently done only via the IFP back end and should be quite infrequent, so I hope we can justify a more complex merging there. Reviewed-by: Sumit Bose <sbose@redhat.com>
Diffstat (limited to 'src/util')
-rw-r--r--src/util/util_errors.c2
-rw-r--r--src/util/util_errors.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/util/util_errors.c b/src/util/util_errors.c
index 458321a08..2d2bafb1e 100644
--- a/src/util/util_errors.c
+++ b/src/util/util_errors.c
@@ -91,6 +91,8 @@ struct err_string error_to_str[] = {
{ "SBUS request already handled" }, /* ERR_SBUS_REQUEST_HANDLED */
{ "Sysdb version is too old" }, /* ERR_SYSDB_VERSION_TOO_OLD */
{ "Sysdb version is too new" }, /* ERR_SYSDB_VERSION_TOO_NEW */
+ { "Domain has to timestamp cache" }, /* ERR_NO_TS */
+ { "No timestamp cache record" }, /* ERR_TS_CACHE_MISS */
{ "ERR_LAST" } /* ERR_LAST */
};
diff --git a/src/util/util_errors.h b/src/util/util_errors.h
index 2f4791522..e8ea87765 100644
--- a/src/util/util_errors.h
+++ b/src/util/util_errors.h
@@ -113,6 +113,8 @@ enum sssd_errors {
ERR_SBUS_REQUEST_HANDLED,
ERR_SYSDB_VERSION_TOO_OLD,
ERR_SYSDB_VERSION_TOO_NEW,
+ ERR_NO_TS,
+ ERR_TS_CACHE_MISS,
ERR_LAST /* ALWAYS LAST */
};