-
Notifications
You must be signed in to change notification settings - Fork 240
Operation handling for reliable receipts #1637
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
Changes from 5 commits
e056a35
0585016
3678677
22f7a50
77d478f
387af52
b29c640
91255ab
d75e801
9c53fff
283dce4
9ebfc42
b16ed26
7fb6b08
e8fbe13
7ac8f7e
098a188
5839d3c
b5c4555
40fe22e
456279a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| // Copyright © 2024 Kaleido, Inc. | ||
| // | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| // | ||
|
|
@@ -47,6 +47,7 @@ | |
| ResubmitOperations(ctx context.Context, txID *fftypes.UUID) (total int, resubmit []*core.Operation, err error) | ||
| AddOrReuseOperation(ctx context.Context, op *core.Operation, hooks ...database.PostCompletionHook) error | ||
| BulkInsertOperations(ctx context.Context, ops ...*core.Operation) error | ||
| SubmitBulkOperationUpdates(ctx context.Context, updates []*core.OperationUpdate, onCommit chan<- bool) | ||
| SubmitOperationUpdate(update *core.OperationUpdate) | ||
| GetOperationByIDCached(ctx context.Context, opID *fftypes.UUID) (*core.Operation, error) | ||
| ResolveOperationByID(ctx context.Context, opID *fftypes.UUID, op *core.OperationUpdateDTO) error | ||
|
|
@@ -77,6 +78,18 @@ | |
| cache cache.CInterface | ||
| } | ||
|
|
||
| // SubmitBulkOperationUpdate implements Manager. | ||
| func (om *operationsManager) SubmitBulkOperationUpdates(ctx context.Context, updates []*core.OperationUpdate, onCommit chan<- bool) { | ||
| for _, update := range updates { | ||
| errString := "" | ||
| if update.ErrorMessage != "" { | ||
| errString = fmt.Sprintf(" error=%s", update.ErrorMessage) | ||
| } | ||
| log.L(om.ctx).Debugf("%s updating operation %s status=%s%s", update.Plugin, update.NamespacedOpID, update.Status, errString) | ||
| } | ||
| om.updater.SubmitBulkOperationUpdates(ctx, updates, onCommit) | ||
|
||
| } | ||
|
|
||
| func NewOperationsManager(ctx context.Context, ns string, di database.Plugin, txHelper txcommon.Helper, cacheManager cache.Manager) (Manager, error) { | ||
| if di == nil || txHelper == nil { | ||
| return nil, i18n.NewError(ctx, coremsgs.MsgInitializationNilDepError, "OperationsManager") | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.