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

COUCHBASE: Add bucket replace functionality #1888

Merged
merged 1 commit into from
Aug 20, 2019
Merged

COUCHBASE: Add bucket replace functionality #1888

merged 1 commit into from
Aug 20, 2019

Conversation

maxrem
Copy link
Contributor

@maxrem maxrem commented Aug 13, 2019

Purpose

The Couchebase API provides replace (Replace a Document if it does already exist.). This was not implemented in Alpakka Couchbase before.

References

References #1884

Changes

  • Added replace implementation
  • Added tests

Background Context

  • I've tried to follow the upsert implementation for replace
  • I've added bucketName to upsertSampleData because you need documents in Couchbase for replace to work
  • I've added assertions in CouchbaseExamplesTest.java to the upsert tests as well
  • I've rearranged CouchbaseFlowSpec because there were delete tests under upsert which was confusing

- added bucketName to upsertSampleData because you need documents in
Couchbase for replace to work
- added assertions in CouchbaseExamplesTest.java to the upsert tests as
well
- rearranged CouchbaseFlowSpec because there were delete tests under
upsert which was confusing
- added docs
- added backwards excludes
Copy link
Member

@2m 2m left a comment

Choose a reason for hiding this comment

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

This really LGTM! Nice and clean.

@2m
Copy link
Member

2m commented Aug 14, 2019

@johanandren mind taking a quick look?

@2m 2m added this to the 2.0.0 milestone Aug 14, 2019
Copy link
Member

@johanandren johanandren left a comment

Choose a reason for hiding this comment

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

LGTM!

Not 100% sure I think every operation on the session should have flow abstractions out of the box when you can just use the session together with mapAsync. I'll leave it the Alpakka team to decide about that though.

@2m
Copy link
Member

2m commented Aug 20, 2019

I think having Flow/Sink factories is worth for consistency and also for Couchbase session materialization out from the extension. There is a bit of boilerplate code there, and it is nice to have it abstracted.

@ennru
Copy link
Member

ennru commented Oct 9, 2019

Backported for 1.1.2 with #1975

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants