Skip to content

Commit e1f2721

Browse files
committed
update retry client to use importbulk instead of bulkimport
1 parent 0f46ba6 commit e1f2721

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

v1/retryable_client.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,20 +75,20 @@ func NewRetryableClient(endpoint string, opts ...grpc.DialOption) (*RetryableCli
7575
}, nil
7676
}
7777

78-
// RetryableBulkImportRelationships is a wrapper around BulkImportRelationships.
78+
// RetryableBulkImportRelationships is a wrapper around ImportBulkRelationships.
7979
// It retries the bulk import with different conflict strategies in case of failure.
8080
// The conflict strategy can be one of Fail, Skip, or Touch.
8181
// Fail will return an error if any duplicate relationships are found.
8282
// Skip will ignore duplicates and continue with the import.
8383
// Touch will retry the import with TOUCH semantics in case of duplicates.
8484
func (rc *RetryableClient) RetryableBulkImportRelationships(ctx context.Context, relationships []*v1.Relationship, conflictStrategy ConflictStrategy) error {
85-
bulkImportClient, err := rc.BulkImportRelationships(ctx)
85+
bulkImportClient, err := rc.ImportBulkRelationships(ctx)
8686
if err != nil {
8787
return fmt.Errorf("error creating writer stream: %w", err)
8888
}
8989

9090
// Error handled later during CloseAndRecv call
91-
_ = bulkImportClient.Send(&v1.BulkImportRelationshipsRequest{
91+
_ = bulkImportClient.Send(&v1.ImportBulkRelationshipsRequest{
9292
Relationships: relationships,
9393
})
9494

@@ -98,7 +98,7 @@ func (rc *RetryableClient) RetryableBulkImportRelationships(ctx context.Context,
9898
}
9999

100100
// Failure to commit transaction means the stream is closed, so it can't be reused any further
101-
// The retry will be done using WriteRelationships instead of BulkImportRelationships
101+
// The retry will be done using WriteRelationships instead of ImportBulkRelationships
102102
// This lets us retry with TOUCH semantics in case of failure due to duplicates
103103
retryable := isRetryableError(err)
104104
conflict := isAlreadyExistsError(err)

0 commit comments

Comments
 (0)