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

Replace UpsertOperation with InsertOperation #350

Merged
merged 2 commits into from Dec 6, 2021

Conversation

awrichar
Copy link
Contributor

@awrichar awrichar commented Dec 3, 2021

No code path ever passes allowExisting=true, and we already have a separate
UpdateOperation method for updates. Therefore, rename this method to
InsertOperation and remove the unneeded branches.

No code path ever passes allowExisting=true, and we already have a separate
UpdateOperation method for updates. Therefore, rename this method to
InsertOperation and remove the unneeded branches.

Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
operation.Output,
),
func() {
s.callbacks.UUIDCollectionNSEvent(database.CollectionOperations, fftypes.ChangeEventTypeCreated, operation.Namespace, operation.ID)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notably, there is no path where we emit ChangeEventTypeUpdated for operations. The old code gave the impression that there was, but it was in a never-used code branch.

The separate UpdateOperation method does not emit this event, presumably because it may not know the namespace.

@shorsher
Copy link
Member

shorsher commented Dec 3, 2021

🚀

Copy link
Contributor

@peterbroadhurst peterbroadhurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚤

@awrichar awrichar merged commit 95b0ad3 into hyperledger:main Dec 6, 2021
@awrichar awrichar deleted the insert branch December 6, 2021 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants