Skip to content

Commit d80b0c6

Browse files
authored
Merge pull request #123 from authzed/update-import-bulk-documentation
Update documentation of BulkImportRelationshipsRequest
2 parents 830feed + 0196957 commit d80b0c6

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

authzed/api/v1/experimental_service.proto

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,10 @@ message BulkCheckPermissionResponseItem {
222222
// BulkImportRelationshipsRequest represents one batch of the streaming
223223
// BulkImportRelationships API. The maximum size is only limited by the backing
224224
// datastore, and optimal size should be determined by the calling client
225-
// experimentally. Any relationships within the same request are guaranteed to
226-
// be written in a single transaction. If any of the relationships already
227-
// exist, the transaction will fail and no relationships will be written.
225+
// experimentally. When BulkImport is invoked and receives its first request message,
226+
// a transaction is opened to import the relationships. All requests sent to the same
227+
// invocation are executed under this single transaction. If a relationship already
228+
// exists within the datastore, the entire transaction will fail with an error.
228229
message BulkImportRelationshipsRequest {
229230
repeated Relationship relationships = 1
230231
[ (validate.rules).repeated .items.message.required = true ];

authzed/api/v1/permission_service.proto

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,10 @@ message ResolvedSubject {
670670
// ImportBulkRelationshipsRequest represents one batch of the streaming
671671
// ImportBulkRelationships API. The maximum size is only limited by the backing
672672
// datastore, and optimal size should be determined by the calling client
673-
// experimentally.
673+
// experimentally. When ImportBulk is invoked and receives its first request message,
674+
// a transaction is opened to import the relationships. All requests sent to the same
675+
// invocation are executed under this single transaction. If a relationship already
676+
// exists within the datastore, the entire transaction will fail with an error.
674677
message ImportBulkRelationshipsRequest {
675678
repeated Relationship relationships = 1
676679
[ (validate.rules).repeated .items.message.required = true ];

0 commit comments

Comments
 (0)