Skip to content
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

Data aggregation C++ API #248

Merged
merged 29 commits into from May 12, 2022
Merged

Conversation

mellis13
Copy link
Collaborator

@mellis13 mellis13 commented Apr 14, 2022

This is a draft PR for the data aggregation API in C++. A draft PR has been put up so parallel work can be done multi-threading the dataset retrieval from cluster shards. CI tests will likely fail until all functionality is done.

The following items still need to be addressed before final review and merge of this PR:

  • Implement rename_list()
  • Tests for rename_list()
  • Implement copy_list()
  • Tests for copy_list()
  • Implement Redis::run_via_unordered_pipelines(). This was implemented in RedisCluster and the Redis version of this function will be extremely easy since all keys are colocated on one shard.
  • More tests to cover error statements to ensure code coverage.
  • Cleanup Client::_get_dataset_list_range to functionalize the code for reuse in other areas (e.g. Client.get_dataset()
  • Resolve whether we want the retrieved dataset names to be the dataset key or the actual names provided by the user (discussion to follow).
  • Nest pipeline execution so that redis-plus-plus errors can be caught
  • Documentation on the data aggregation API
  • Threading on the innermost loop (i.e. RedisCluster::run_via_unordered_pipelines()). This will be evaluated in a separate ticket, and this PR should not be merged before performance data is available from that.

@codecov-commenter
Copy link

codecov-commenter commented Apr 15, 2022

Codecov Report

Merging #248 (d0c0d8c) into develop (7f2f9ea) will decrease coverage by 0.69%.
The diff coverage is 80.45%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #248      +/-   ##
===========================================
- Coverage    80.85%   80.15%   -0.70%     
===========================================
  Files           51       54       +3     
  Lines         3008     3326     +318     
===========================================
+ Hits          2432     2666     +234     
- Misses         576      660      +84     
Impacted Files Coverage Δ
include/client.h 100.00% <ø> (ø)
include/commandlist.h 100.00% <ø> (ø)
include/commandreply.h 100.00% <ø> (ø)
include/redisserver.h 33.33% <ø> (ø)
src/cpp/pipelinereply.cpp 36.84% <36.84%> (ø)
include/pipelinereply.h 50.00% <50.00%> (ø)
src/cpp/commandlist.cpp 87.80% <66.66%> (-3.63%) ⬇️
src/cpp/client.cpp 83.89% <88.20%> (+0.44%) ⬆️
include/dataset.h 100.00% <100.00%> (ø)
src/cpp/redis.cpp 54.54% <100.00%> (-4.51%) ⬇️
... and 14 more

include/client.h Outdated Show resolved Hide resolved
include/client.h Outdated Show resolved Hide resolved
include/client.h Outdated Show resolved Hide resolved
retrieval from aggregation lists.  Tests now also check
that dataset names match.
error handling is easier to understand.  This required
some changes to PipelineReply ojbect and an additional
vector of command pointers in the unordered pipeline execution.
@mellis13 mellis13 requested a review from ashao April 21, 2022 21:00
Copy link
Member

@ashao ashao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice work here @mellis13. You and @billschereriii already anticipated/addressed the things that I thought might have been issues. The main change that I'm suggesting is to add/expose pop functionality to the list in the event that you have multiple consumers of the aggregated list.

doc/data_structures.rst Show resolved Hide resolved
src/cpp/rediscluster.cpp Show resolved Hide resolved
src/cpp/client.cpp Show resolved Hide resolved
Copy link
Member

@ashao ashao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes all look good to me

@mellis13 mellis13 marked this pull request as ready for review May 12, 2022 23:13
@mellis13 mellis13 merged commit 5e1320c into CrayLabs:develop May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants