diff --git a/CHANGELOG.md b/CHANGELOG.md index e850cc287..0d2ba55b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Changed * Optimize select with known bucket_id (#234). +* Deprecate manual sharding schema reload (#212). ### Fixed * Fix processing storage error for tuple-merger implementation of diff --git a/README.md b/README.md index 7097b53a5..4f14ec503 100644 --- a/README.md +++ b/README.md @@ -117,26 +117,11 @@ Table below describe what operations supports custom sharding key: Current limitations for using custom sharding key: -- It's not possible to update sharding keys automatically when schema is - updated on storages, see - [#212](https://github.com/tarantool/crud/issues/212). However it is possible - to do it manually with `require('crud.common.sharding_key').update_cache()` - (this function updates both caches: sharding key cache and sharding function - cache, but returned value is sharding key from cache). - No support of JSON path for sharding key, see [#219](https://github.com/tarantool/crud/issues/219). - `primary_index_fieldno_map` is not cached, see [#243](https://github.com/tarantool/crud/issues/243). -Current limitations for using custom sharding functions: - -- It's not possible to update sharding functions automatically when schema is - updated on storages, see - [#212](https://github.com/tarantool/crud/issues/212). However it is possible - to do it manually with `require('crud.common.sharding_func').update_cache()` - (this function updates both caches: sharding key cache and sharding function - cache, but returned value is sharding function from cache). - ### Insert ```lua diff --git a/crud/common/sharding_func.lua b/crud/common/sharding_func.lua index a3aca4c19..501ca709f 100644 --- a/crud/common/sharding_func.lua +++ b/crud/common/sharding_func.lua @@ -1,3 +1,5 @@ +local log = require('log') + local sharding_metadata_module = require('crud.common.sharding.sharding_metadata') local sharding_func_cache = {} @@ -9,6 +11,8 @@ local sharding_func_cache = {} -- This method provides similar behavior for -- sharding function cache. function sharding_func_cache.update_cache(space_name) + log.warn("require('crud.common.sharding_func').update_cache()" .. + "is deprecated and will be removed in future releases") return sharding_metadata_module.update_sharding_func_cache(space_name) end diff --git a/crud/common/sharding_key.lua b/crud/common/sharding_key.lua index 07c76f5db..30d75e7b1 100644 --- a/crud/common/sharding_key.lua +++ b/crud/common/sharding_key.lua @@ -1,3 +1,5 @@ +local log = require('log') + local sharding_metadata_module = require('crud.common.sharding.sharding_metadata') local sharding_key_cache = {} @@ -7,6 +9,8 @@ local sharding_key_cache = {} -- for updating sharding key cache in their -- projects like `require('crud.common.sharding_key').update_cache()` function sharding_key_cache.update_cache(space_name) + log.warn("require('crud.common.sharding_key').update_cache()" .. + "is deprecated and will be removed in future releases") return sharding_metadata_module.update_sharding_key_cache(space_name) end