-
Notifications
You must be signed in to change notification settings - Fork 345
add ydb component #934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
add ydb component #934
Conversation
7914dd7
to
5d867bf
Compare
|
||
// clang-format off | ||
|
||
/// @page Caching Component for Ydb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move the extended documentation to scripts/docs/*/ydb_cache.md
Huge pages in C++ code are considered harmful for new code
/// | ||
/// @see @ref ydb_cache, @ref scripts/docs/en/userver/caches.md | ||
template <typename YdbCachePolicy> | ||
class YdbCache final |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
components::YdbCache -> ydb::CacheComponent
We don't use components::
namespace for new code, and duplicating "ydb" twice is also not the best naming
ydb_cache::detail::kDefaultChunkSize)} { | ||
/* TODO | ||
UINVARIANT( | ||
!chunk_size_ || storages::ydb::Portal::IsSupportedByDriver(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A reminder to clean all the commented code
config.Name() + "' cache"); | ||
} | ||
|
||
const auto ydb_alias = config["ydbcomponent"].As<std::string>(""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is only 1 ydb component, but it has multiple databases
|
||
// clang-format off | ||
|
||
/// @page Caching Component for Ydb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the new documentation page to index.md
as a sublist item to main YDB page
/// ---------- | ||
/// | ||
/// @htmlonly <div class="bottom-nav"> @endhtmlonly | ||
/// ⇦ @ref scripts/docs/en/userver/cache_dumps.md | @ref scripts/docs/en/userver/lru_cache.md ⇨ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix according to the position in index.md
relative to other pages.
Also fix the footers in the neighbouring pages to point to the new ydb cache page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a functional test. It shouldn't use any fancy features. Have a small, but realistic table. Add a handler that returns data from the cache. Check that the cache works. Check that the cache can get stale relatively to the data in the table, then call await service_client.invalidate_caches(cache_names=...)
to update the cache and verify it
The test will also serve as a proof-of-concept that you've really got a working YDB cache. test/cache.cpp
does not provide that guarantee
adding ydb cache policy