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

[STACKED #1229] [ENH] Add a CollectionAssignmentPolicy and move topic creation into SysDB using the policy #1237

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

HammadB
Copy link
Collaborator

@HammadB HammadB commented Oct 12, 2023

Description of changes

Summarize the changes made by this PR.

  • Improvements & Bug fixes
    • Adds a CollectionAssignmentPolicy and moves topic creation down into SysDB
    • Changes SysDB to not accept a Collection Object in create_collection() but params instead
  • New functionality
    - None

TODO:

  • delete topic should also live in the sysdb now.

Test plan

How are these changes tested?
Existing tests were modified with the refactor and ensured to pass.

Documentation Changes

None required

@github-actions
Copy link

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readbility, Modularity, Intuitiveness)

@HammadB HammadB changed the title Add a CollectionAssignmentPolicy and move topic creation into SysDB using the policy [ENH] [STACKED #1229] Add a CollectionAssignmentPolicy and move topic creation into SysDB using the policy Oct 12, 2023
@HammadB HammadB changed the title [ENH] [STACKED #1229] Add a CollectionAssignmentPolicy and move topic creation into SysDB using the policy [STACKED #1229] [ENH] Add a CollectionAssignmentPolicy and move topic creation into SysDB using the policy Oct 12, 2023
@HammadB HammadB requested a review from Ishiihara October 12, 2023 17:17
@HammadB HammadB force-pushed the hammad/coordinator_sysdb branch from 6310595 to 2b150e6 Compare October 12, 2023 17:38
@HammadB HammadB force-pushed the hammad/topic_management_sysdb branch 3 times, most recently from b200d36 to fa502f1 Compare October 12, 2023 21:10
Copy link
Contributor

@Ishiihara Ishiihara left a comment

Choose a reason for hiding this comment

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

LGTM

@HammadB HammadB force-pushed the hammad/coordinator_sysdb branch 3 times, most recently from f2cf8a6 to b25c8bd Compare October 13, 2023 23:20
HammadB added a commit that referenced this pull request Oct 16, 2023
## Description of changes
This PR is stacked on #1228, please TAL at that before this. 

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
	 - n/a
 - New functionality
	 - Introduced a grpc sysdb implementation.
	 - Migrate the protobufs to support Null vs Presence where needed.
	 - Added minimal protobuf definitions to implement the grpc coordinator
	 - Add a mock grpc sysdb server that reimplements the core functionality in memory for testing.

Will address the following open questions in stacked PRs!
Open questions/issues:
- [x] Collection <> Topic Mapping
          _This requires some thought if we use hashing then we can just map the collection onto a topic and store it. Will we ever want to shard a collection across topics?_
        I don't think this is needed at this moment!
- [x] Topic management moving to sysdb interface 
           _This is conceptually simple, we make topic creation implicitly part of sysdb create collection_
          I address this in #1237 
- [x] We need to move the get_or_create concept into sysdb
          _This is conceptually simple, we just move this logic into sysdb and make it aware of it_
         I address this in #1242

## Test plan
*How are these changes tested?*
I added a mock gRPC server that implements the basic functionality of sysdb with in memory data structures.

We will run the coordinator tests with this impl in the bin/cluster test once the go coordinator service is ready from @Ishiihara 

## Documentation Changes
None required.
@HammadB HammadB force-pushed the hammad/topic_management_sysdb branch from fa502f1 to 15d9182 Compare October 16, 2023 02:59
@HammadB HammadB changed the base branch from hammad/coordinator_sysdb to main October 16, 2023 02:59
@HammadB HammadB force-pushed the hammad/topic_management_sysdb branch from 15d9182 to 9792f60 Compare October 16, 2023 03:18
@HammadB HammadB enabled auto-merge (squash) October 16, 2023 03:19
@HammadB HammadB force-pushed the hammad/topic_management_sysdb branch from 9792f60 to b78877a Compare October 16, 2023 04:14
@HammadB HammadB force-pushed the hammad/topic_management_sysdb branch from b78877a to f4ef680 Compare October 16, 2023 04:24
@HammadB HammadB merged commit b042331 into main Oct 16, 2023
85 checks passed
HammadB added a commit that referenced this pull request Oct 16, 2023
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
	 - Move get_or_create logic into the sys db interface
 - New functionality
	 - None added

## Test plan
*How are these changes tested?*
Existing tests as well as a new test at the sysdb level.
- [x] Tests pass locally with `pytest` for python, `yarn test` for js

## Documentation Changes
None, all changes are to internal interfaces.
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.

2 participants