-
Notifications
You must be signed in to change notification settings - Fork 43
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
Add caching for versions infos #900
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #900 +/- ##
======================================
Coverage 81.2% 81.2%
======================================
Files 303 305 +2
Lines 10575 10620 +45
======================================
+ Hits 8591 8628 +37
- Misses 1984 1992 +8
Continue to review full report at Codecov.
|
olp-cpp-sdk-dataservice-read/include/olp/dataservice/read/VersionedLayerClient.h
Outdated
Show resolved
Hide resolved
db5e6c8
to
ba94dd9
Compare
610f818
to
0d299bd
Compare
olp-cpp-sdk-dataservice-read/include/olp/dataservice/read/CatalogClient.h
Outdated
Show resolved
Hide resolved
return repository::CatalogRepository::GetVersionsList( | ||
std::move(catalog), context, std::move(request), std::move(settings)); |
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.
I wonder why do we need then copy parameters on CatalogRepository::GetVersionsList() if it is sync? Can we move towards pass by reference to save copies?
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.
Could we do this in separate pull request and make this changes also in other clients?
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.
Considering our current backlog I dont think that will be any time soon. Ill add a ticket to the backlog for this but i would prefer if we can already do it in your PR as we also did it in #891.
But please note that this is not valid for all methods. For example CatalogClient::GetCatalog() could still use it as it does not have any version relation.
019bbda
to
13c5256
Compare
c50c5ff
to
0f27430
Compare
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.
Tests missing!
return repository::CatalogRepository::GetVersionsList( | ||
std::move(catalog), context, std::move(request), std::move(settings)); |
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.
Considering our current backlog I dont think that will be any time soon. Ill add a ticket to the backlog for this but i would prefer if we can already do it in your PR as we also did it in #891.
But please note that this is not valid for all methods. For example CatalogClient::GetCatalog() could still use it as it does not have any version relation.
olp-cpp-sdk-dataservice-read/src/generated/serializer/VersionInfosSerializer.cpp
Outdated
Show resolved
Hide resolved
olp-cpp-sdk-dataservice-read/src/generated/serializer/VersionInfosSerializer.cpp
Outdated
Show resolved
Hide resolved
olp-cpp-sdk-dataservice-read/src/generated/serializer/VersionInfosSerializer.h
Outdated
Show resolved
Hide resolved
olp-cpp-sdk-dataservice-read/src/repositories/CatalogCacheRepository.cpp
Outdated
Show resolved
Hide resolved
olp-cpp-sdk-dataservice-read/src/repositories/CatalogCacheRepository.cpp
Outdated
Show resolved
Hide resolved
olp-cpp-sdk-dataservice-read/src/repositories/CatalogCacheRepository.cpp
Outdated
Show resolved
Hide resolved
olp-cpp-sdk-dataservice-read/src/repositories/CatalogCacheRepository.cpp
Outdated
Show resolved
Hide resolved
0f27430
to
e327e4e
Compare
e327e4e
to
61e3967
Compare
olp-cpp-sdk-dataservice-read/src/repositories/CatalogCacheRepository.cpp
Outdated
Show resolved
Hide resolved
olp-cpp-sdk-dataservice-read/src/repositories/CatalogCacheRepository.cpp
Outdated
Show resolved
Hide resolved
@@ -65,4 +68,50 @@ TEST(PartitionsCacheRepositoryTest, DefaultExpiry) { | |||
} | |||
} | |||
|
|||
TEST(CatalogCacheRepositoryTest, VersionsList) { |
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 also add a test case for start_version = -1
as specified by the documentation:
startVersion
The beginning of the range of versions you want to get (exclusive). By convention -1 indicates the initial version before the first publication. After the first publication, the catalog version is 0.
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.
Test will be added to CatalogRepositoryTest
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.
But why in CatalogRepositoryTest as this will have direct implication upon the key generation, which needs to be tested that it works correctly, means that not by mistake the -1
startVersion is converted to 0 as we do not support -1 while converting to string.
61e3967
to
d18a5f0
Compare
olp-cpp-sdk-dataservice-read/src/generated/parser/JsonParserCacheValue.h
Outdated
Show resolved
Hide resolved
Add implementation to put/get versions list to catalog client cache. Implement versions infos cache tests. Relates-To: OLPEDGE-1606 Signed-off-by: Liubov Didkivska <[email protected]>
Add implementation to put/get versions list to catalog client cache. Implement versions infos cache tests. Relates-To: OLPEDGE-1606 Signed-off-by: Liubov Didkivska <[email protected]>
Add implementation to put/get versions list to catalog client cache. Implement versions infos cache tests. Relates-To: OLPEDGE-1606 Signed-off-by: Liubov Didkivska <[email protected]>
e3b5dbd
to
0ef9d58
Compare
Add implementation to put/get versions
list to catalog client cache.
Implement versions infos cache tests.
Relates-To: OLPEDGE-2080
Signed-off-by: Liubov Didkivska [email protected]