summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_cache.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* rgw: refactor selected files for better above- vs below-the-lineKaleb S. KEITHLEY2023-01-231-4/+1
| | | | | | | Move more files into driver/rados for better above- vs below- the-line. Use #pragma once everywhere (versus fixing all the Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* rgw: build without "using namespace std"Kefu Chai2021-08-131-18/+18
| | | | | | | | | | * add "std::" prefix in headers * add "using" declarations in .cc files. so we don't rely on "using namespace std" in one or more included headers. Signed-off-by: Kefu Chai <kchai@redhat.com>
* rgw: Rename REMOVE_OBJ to INVALIDATE_OBJAdam C. Emerson2021-07-141-2/+2
| | | | | | | | | | | Also rename ObjectCache::remove to ObjectCache::invalidate_remove Since we're depending on these message types/functions having invalidate semantics but NOT caching a negative result, rename and leave a comment for clarity. Fixes: https://tracker.ceph.com/issues/51674 Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
* rgw: distribute() takes RGWCacheNotifyInfoAdam C. Emerson2021-07-141-0/+5
| | | | | | | | So we don't have to parse the bufferlist back out to find what object to throw out of the cache. Fixes: https://tracker.ceph.com/issues/51674 Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
* rgw: add DPP's to logging for most opsAli Maredia2021-05-041-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | This commit contains the following major changes: - Most log output lines for major ops now have DoutPrefixProviders. - Create new macro ldpp_subdout. This macro is meant as a replacement for lsubdout for headerfiles that do not define the rgw subsys. - Changes to RGWObjManifest begin and end iterators. - Make it so that rgw_dencoder.cc should only contain the logic related to encoding. Also add dpp to ldouts and lderr's already using req_state and replace sync_env/env->dpp's with dpp's Signed-off-by: Ali Maredia <amaredia@redhat.com> Signed-off-by: Kalpesh Pandya <kapandya@redhat.com> Signed-off-by: Casey Bodley <cbodley@redhat.com>
* RGW - Make sure editor settings are correct for all filesDaniel Gryniewicz2019-08-191-1/+1
| | | | Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
* Merge branch 'wip-rgw-metadata-servicification'Casey Bodley2019-08-131-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/rgw/rgw_auth.cc src/rgw/rgw_auth_registry.h src/rgw/rgw_auth_s3.h src/rgw/rgw_bucket.cc src/rgw/rgw_bucket.h src/rgw/rgw_data_sync.h src/rgw/rgw_frontend.h src/rgw/rgw_log.h src/rgw/rgw_main.cc src/rgw/rgw_rados.cc src/rgw/rgw_rados.h src/rgw/rgw_rest_s3.h src/rgw/rgw_rest_sts.h src/rgw/rgw_swift_auth.h src/rgw/rgw_user.cc src/rgw/rgw_user.h src/rgw/services/svc_sys_obj_core.h
| * rgw: more headers cleanupYehuda Sadeh2019-07-291-2/+0
| | | | | | | | | | | | Dependency reduction Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
| * rgw: header cleanup: remove code from rgw_rados.hYehuda Sadeh2019-07-291-1/+3
| | | | | | | | Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
* | rgw: s/Mutex/ceph::mutex/Kefu Chai2019-08-031-4/+4
|/ | | | Signed-off-by: Kefu Chai <kchai@redhat.com>
* rgw: chained cache shouldn't access service after it was unchainedYehuda Sadeh2018-11-081-0/+3
| | | | | | | This fixes a cleanup ordering issue. We can now have the chained cache removed before and after the service is destructed. Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
* rgw: unregister chained cache on shutdownYehuda Sadeh2018-11-081-0/+1
| | | | Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
* rgw: svc: remove SystemObject implYehuda Sadeh2018-11-081-0/+17
| | | | Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
* rgw: svc_cache: more workYehuda Sadeh2018-11-081-456/+0
| | | | Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
* Rename "include/assert.h"Brad Hubbard2018-09-141-1/+1
| | | | | | | | | This conflicts with the system assert.h so rename and change includes to reflect the new name. Fixes: http://tracker.ceph.com/issues/35682 Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
* common,rbd,rgw,osd: extract config values into ConfigValuesKefu Chai2018-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | this change introduce three classes: ConfigValues, ConfigProxy and ConfigReader. in seastar port of OSD, each CPU shard will hold its own reference of configuration, and upon changes of settings, each shard will be updated with the new setting in async. so this forces us to be able to keep two set of configuration at the same time. so we need to extract the changeable part of md_config_t out. so we can replace the old one with new one on demand, and let different shards share the same unchanged part, amon the other things, the Options map and the lookup tables. that's why we need ConfigValues. we will add a policy template for this class, so we can specialize for Seastar implementation to allow different ConfigProxy instances to point md_config_impl<> to different ConfigValues. because the observer interface is still using md_config_t, to minimise the impact of this change, handle_conf_change() and handle_subsys_change() are not changed. but as it accepts a `const md_config_t`, which cannot be used to create/reference the ConfigProxy holding it, we need to introduce ConfigReader for reading the updated setting from md_config_t in a simpler way, without exposing the internal "values" member variable. Signed-off-by: Kefu Chai <kchai@redhat.com>
* rgw: update ObjectCacheInfo::time_added on overwriteCasey Bodley2018-05-301-1/+1
| | | | | | Fixes: http://tracker.ceph.com/issues/24346 Signed-off-by: Casey Bodley <cbodley@redhat.com>
* rgw: use const_iterator for decodeKefu Chai2018-05-171-4/+4
| | | | Signed-off-by: Kefu Chai <kchai@redhat.com>
* rgw: Add cache introspection and manipulationAdam C. Emerson2018-02-071-5/+67
| | | | | | | | Provide the ability to examine and delete elements from the cache. Fixes: http://tracker.ceph.com/issues/22603 Fixes: http://tracker.ceph.com/issues/22604 Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
* Merge pull request #19384 from ivancich/wip-rgw-lazy-cache-put-on-excl-createCasey Bodley2018-01-241-3/+12
|\ | | | | | | | | rgw: do not update all gateway caches upon creation of system obj w/ exclusive flag Reviewed-by: Casey Bodley <cbodley@redhat.com>
| * When a system object is created exclusively, do not distribute theJ. Eric Ivancich2018-01-041-3/+12
| | | | | | | | | | | | | | cache information to the other rados gateways and instead let them lazily retrieve the information when they need it. Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
* | rgw: RGWRados::put_system_obj takes const bufferlistCasey Bodley2018-01-121-4/+4
| | | | | | | | Signed-off-by: Casey Bodley <cbodley@redhat.com>
* | rgw: Use unqualified encode/decodeAdam C. Emerson2018-01-101-32/+32
|/ | | | | | | This is a portion of Part 1 of the namespace project: using ADL properly in encode and decode so we can use namespaces easily in Ceph. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
* rgw: change ObjectCache::lru from deque back to listCasey Bodley2018-01-031-4/+4
| | | | | | | | | ObjectCacheEntry stores an lru_iter into this lru, and depends on that iterator remaining valid as other entries are inserted/erased Fixes: http://tracker.ceph.com/issues/22560 Signed-off-by: Casey Bodley <cbodley@redhat.com>
* rgw: Plumb refresh logic into object cacheAdam C. Emerson2017-12-211-4/+7
| | | | | | | | Now when we force a refetch of bucket info it will actually go to the OSD rather than simply using the objects in the object cache. Fixes: http://tracker.ceph.com/issues/22517 Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
* rgw: Add expiration in the object cacheAdam C. Emerson2017-12-211-5/+9
| | | | | | | | We had it in the chained caches, but it doesn't do much good if they just fetch objects out of the object cache. Fixes: http://tracker.ceph.com/issues/22517 Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
* rgw: Use unordered_map for cache_mapAdam C. Emerson2017-12-211-1/+2
| | | | | | This should get us better look up speeds. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
* rgw: Cache data structure cleanupAdam C. Emerson2017-12-211-8/+10
| | | | | | | | | Do not use std::list for the LRU. And really don't cons up a std::list just to pass a variable number of arguments to a function. (Use initializer_list instead.) Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
* rgw: fix chained cache invalidation to prevent cache size growthMark Kogan2017-12-121-0/+1
| | | | | | | | above the rgw_cache_lru_size limit Fixes: http://tracker.ceph.com/issues/22410 Signed-off-by: Mark Kogan <mkogan@redhat.com>
* Merge pull request #10992 from zhangsw/fix-rgw-cache-bugYuri Weinstein2017-11-201-5/+2
|\ | | | | | | | | | | | | | | | | | | rgw: fix a bug in rgw cache in delete_system_obj and get_system_obj. Reviewed-by: Matt Benjamin <mbenjami@redhat.com> Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Yehuda Sadeh <yehuda@redhat.com> Reviewed-by: Amit Kumar <amitkuma@redhat.com>
| * rgw: fix a bug in rgw cache in delete_system_obj and get_system_obj.zhangshaowen2017-04-051-5/+2
| | | | | | | | | | | | | | | | Cache's key is generated by function normal_name(bucket,oid), and these two parameters are generated by function normalize_bucket_and_obj. But in delete_system_obj and get_system_obj it doesn't work like that. In other place ,like put_system_obj_impl, keys are always generated in that way. Signed-off-by: Zhang Shaowen zhangshaowen@cmss.chinamobile.com
* | rgw: add objv_tracker arg to RGWRados::put_system_obj_dataCasey Bodley2017-04-261-3/+9
| | | | | | | | Signed-off-by: Casey Bodley <cbodley@redhat.com>
* | rgw: add pool namespace to cache's key so that system obj can have uniqueZhang Shaowen2017-03-291-2/+2
|/ | | | | | | | key name. Fixes: http://tracker.ceph.com/issues/19372 Signed-off-by: Zhang Shaowen <zhangshaowen@cmss.chinamobile.com>
* Merge pull request #13902 from Wilhelmshaven/rm_redundant_codeCasey Bodley2017-03-211-6/+4
|\ | | | | | | | | rgw: remove redundant codes in rgw_cache.h Reviewed-by: Casey Bodley <cbodley@redhat.com>
| * rgw: remove redundant codes in rgw_cache.hlihongjie2017-03-211-6/+4
| | | | | | | | Signed-off-by: lihongjie <lihongjie@cmss.chinamobile.com>
* | rgw/cleanup: add override in headersliuchang08122017-03-141-11/+11
|/ | | | Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
* rgw: add rgw_obj_index_key, kill RGWObjEntYehuda Sadeh2017-03-091-1/+1
| | | | | | | | Use rgw_obj_index_key to represent entries in bucket index (typedef of cls_rgw_obj_key). Get rid of RGWObjEnt, it was duplicate of rgw_bucket_dir_entry anyway. Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
* rgw: introduce rgw_pool, rgw_raw_objYehuda Sadeh2017-03-091-49/+49
| | | | | | | | Pools are represented by rgw_pool (and not rgw_bucket anymore), and we use rgw_raw_obj to reference rados objs and all 'system' objects (vs rgw_obj that is used for rgw objects). Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
* rgw: fix indentsYan Jun2016-07-141-2/+2
| | | | Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
* rgw: remove temporary variableYan Jun2016-07-111-2/+1
| | | | Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
* rgw: merge setting flags operation togetherYan Jun2016-07-081-3/+2
| | | | Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
* rgw: high resolution timeYehuda Sadeh2016-03-151-16/+13
| | | | | | | | replace time_t, and some utime_t with ceph::real_clock. Use new librados interfaces to stat() and set mtime. Signed-off-by: Yehuda Sadeh <yehuda@redhat.com> Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
* rgw: store system object meta in cache when creating itYehuda Sadeh2016-03-111-2/+8
| | | | | | | | | Fixes: #14678 When creating the system object we can easily also get the object's meta, so keep it in the cache. Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
* rgw: RGWRados internal zone should be protected and not accessed directlyOrit Wasserman2016-02-121-1/+1
| | | | Signed-off-by: Orit Wasserman <owasserm@redhat.com>
* rgw: can read attrs when reading system objYehuda Sadeh2016-02-121-2/+11
| | | | Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
* rgw: don't require system pools to start with a periodYehuda Sadeh2016-02-091-98/+42
| | | | | | | | | Make sure cache operations are being done on system objects. Separate calls where needed to make sure that separate pool/bucket handling is done correctly. When separating calls, don't use objv_tracker for data objects, don't use data constructs for system objects. Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
* rgw: add support for new watch/notify functionalityYehuda Sadeh2015-03-051-1/+20
| | | | | | | | | | | | Disable and invalidate cache on watch error, then reinitialize watch, reenable cache. Signed-off-by: Yehuda Sadeh <yehuda@redhat.com> Conflicts: src/rgw/rgw_cache.h src/rgw/rgw_rados.cc src/rgw/rgw_rados.h
* rgw: switch to new watch/notify APISage Weil2015-03-051-2/+8
| | | | | | | | | | Note that we don't really use it fully, yet. The main semantic change here is that we have to explicitly ack the notify. However, still missing is re-registration of the watch if we see a failure, and ignoring the cache if watch_check tells us the watch is stale. Signed-off-by: Sage Weil <sage@redhat.com>
* rgw: fix caching for remove_system_obj()Yehuda Sadeh2015-01-201-4/+4
| | | | | | | Align the RGWCache method with the RGWRados method. Also, don't use obj head removal objclass call, as it's for data objects, not metadata. Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
* rgw: fix get_system_obj() cachingYehuda Sadeh2015-01-201-6/+10
| | | | | | | | Originally this was get_obj(), but in the cleanup work this was changed to get_system_obj() with somewhat different params. Updated cache to use new interface. Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>