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

Add support for branchable collections #3038

Open
AndrewSisley opened this issue Sep 19, 2024 · 0 comments
Open

Add support for branchable collections #3038

AndrewSisley opened this issue Sep 19, 2024 · 0 comments
Assignees
Labels
area/collections Related to the collections system feature New feature or request
Milestone

Comments

@AndrewSisley
Copy link
Contributor

AndrewSisley commented Sep 19, 2024

There is some high level info in an almanac doc here: https://source.almanac.io/folders/database-team-v1-q4qgzK/branchable-collections-Z0SmQmyPcgaYimjMlHuLZPEGM1s38Ewg?mention_id=4192&docView=Commenting

WIP thoughts:

  • We do not need a composite for each document change, instead we only need one for each transaction commit. This would reduce the cost (performance, size on disk) of a branchable collection considerably in a lot of use cases. Some event based code may need to change for this. The composite commit would contain the cids of all the changes to the collection within the transaction, instead of essentially one cid per composite.
    • It might be best to submit a txn commited event, and include txn.id on update events instead of aggregate update events into a set before publishing them.
    • Make sure the branchable collection is modified within the commit, not after it is commited - may need before/after on-success operations?.
  • We can allow users to query branchable collections at a specific version like we do with documents (the cid query param). This does not however need to be implemented in the initial PR, is just something to bear in mind for now.
@AndrewSisley AndrewSisley added feature New feature or request area/collections Related to the collections system labels Sep 19, 2024
@AndrewSisley AndrewSisley added this to the DefraDB v0.14 milestone Sep 19, 2024
@AndrewSisley AndrewSisley self-assigned this Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/collections Related to the collections system feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant