-
Notifications
You must be signed in to change notification settings - Fork 15
Add protobuf schema for Raft's 'state mutation request' #232
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
Merged
lolski
merged 15 commits into
cluster-support-feature-branch
from
state-mutation-request
Oct 24, 2025
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
fd54471
Replication
lolski 67b0e7f
Replication - remove response objects
lolski 8d1e692
Replication - move messages into replication.proto
lolski fb11d07
Revert "Replication - move messages into replication.proto"
lolski 44209ea
Revert "Replication - remove response objects"
lolski 3fa96ab
Revert "Replication"
lolski ee761e0
Redo the request proto object
lolski 60275c4
Correct package name
lolski 6789f09
Update BUILD
lolski 2060780
Retructure protobuf
lolski 5c769c6
Add protobuf to service
lolski 8c16b08
Add protobuf to service
lolski 90036e4
Update protobuf
lolski 34056c2
Add license header
lolski 00c2246
Update Java and NodeJS build files
lolski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,10 +5,12 @@ | |
| syntax = "proto3"; | ||
|
|
||
| import "proto/raft_service/replication.proto"; | ||
| import "proto/raft_service/request.proto"; | ||
|
|
||
| package typedb.protocol; | ||
|
|
||
| // TODO: If the protocol is exposed, maybe it's actually `TypeDBRaft`? | ||
| service Raft { | ||
| rpc replication (Replication.Req) returns (Replication.Res); | ||
| rpc request (Request) returns (Request); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Without registering the endpoint, the |
||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| // This Source Code Form is subject to the terms of the Mozilla Public | ||
| // License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| // file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
|
||
| syntax = "proto3"; | ||
|
|
||
| package typedb.protocol; | ||
|
|
||
| message Request { | ||
| oneof request { | ||
| Load load = 1; | ||
| DatabaseManager database_manager = 2; | ||
| DatabaseCommit database_commit = 3; | ||
| UserManager user_manager = 4; | ||
| } | ||
|
|
||
| message Load {} | ||
|
|
||
| message DatabaseManager { | ||
| oneof database_manager { | ||
| All all = 1; | ||
| Get get = 2; | ||
| GetUnrestricted get_unrestricted = 3; | ||
| Create create = 4; | ||
| CreateUnrestricted create_unrestricted = 5; | ||
| Delete delete = 6; | ||
| } | ||
|
|
||
| message All {} | ||
| message Get { string name = 1; } | ||
| message GetUnrestricted { string name = 1; } | ||
| message Create { string name = 1; } | ||
| message CreateUnrestricted { string name = 1; } | ||
| message Delete { string name = 1; } | ||
| } | ||
|
|
||
| message DatabaseCommit { | ||
| oneof database_commit { | ||
| SchemaCommit schema = 1; | ||
| DataCommit data = 2; | ||
| } | ||
|
|
||
| message SchemaCommit { | ||
| string name = 1; | ||
| bytes commit_record = 2; | ||
| } | ||
|
|
||
| message DataCommit { | ||
| string name = 1; | ||
| bytes commit_record = 2; | ||
| } | ||
| } | ||
|
|
||
| message UserManager { | ||
| oneof user_manager { | ||
| All all = 1; | ||
| Get get = 2; | ||
| Contains contains = 3; | ||
| Create create = 4; | ||
| Update update = 5; | ||
| Delete delete = 6; | ||
| } | ||
|
|
||
| message All { string accessor = 1; } | ||
| message Get { string name = 1; string accessor = 2; } | ||
| message Contains { string name = 1; } | ||
| message Create { bytes commit_record = 1; } | ||
| message Update { bytes commit_record = 1; } | ||
| message Delete { bytes commit_record = 1; } | ||
| } | ||
| } | ||
|
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Let's add these libs in all languages. Moreover, I remember that there is another place where you need to list all the proto files, please search for
replication-protoandreplication.protousages. I might be wrong.But this might be the reason why it does not build these files without introducing them into the service.
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.
Fixed in 00c2246
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.
Stop checking Github on your holiday bro