-
Notifications
You must be signed in to change notification settings - Fork 645
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 based on akka-persistence-couchbase work #1411
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff! Just some documentation nitpicks.
@@ -20,164 +30,117 @@ The table below shows direct dependencies of this module and the second tab show | |||
|
|||
@@dependencies { projectId="couchbase" } | |||
|
|||
# Overview |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Above in the @@dependency
change $scalaBinaryVersion$
to $scala.binary.version$
and $version$
to $project.version$
.
docs/src/main/paradox/couchbase.md
Outdated
|
||
We will need an @scaladoc[ActorSystem](akka.actor.ActorSystem) and an @scaladoc[ActorMaterializer](akka.stream.ActorMaterializer). | ||
* `CouchbaseSession` offers a direct API for one-off operations | ||
* `CouchbaseSessionRegistry` is a Akka extension to keep track and share `CouchbaseSession`s within an `ActorSystem` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/a Akka/an Akka
docs/src/main/paradox/couchbase.md
Outdated
|
||
Creating flow with single upsert operation | ||
These default values are not recommended for real use, as they do not observe persistence on disk for any node. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/real/production
s/observe peristence on disk/persist to disk
docs/src/main/paradox/couchbase.md
Outdated
|
||
Scala | ||
: @@snip (/couchbase/src/test/scala/docs/scaladsl/CouchbaseSupport.scala) { #delete-BulkFlow } | ||
Read more about durability settings in the [Couchbase documentation](https://docs.couchbase.com/java-sdk/2.6/durability.html#configuring-durability). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We depend on couchbase 2.7.2
but here link to the 2.6
docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed all the links to use extref
now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Looks very interesting and a lot to learn from. However I'm a little concerned about how do failures in in stage flow are now handled. if I have a couchbase cluster with 3 nodes and you have stream of key from 0 to 9 they will be distributed in by its hash among all three master replicas. If for any reason one of the replicas fails, stream will fail and I will loose documents of this master replica and some of the documents that are currently travelled in predecessor stages of the stream. Even if I use I really would like to prevent situation when I send 10k of docs and got only 99995 docs inserted. For my point of view this is most important feature of this plugin and this is why I propagated Failed document and its exception to the next stage. @ennru what do you think, How this functionality can be achieved now? |
For reference this spawned this idea/issue over in Akka akka/akka#26250 |
fbf9ad2
to
f69ab00
Compare
Thank you @dannylesnik for looking into this PR. |
@ennru Hi, the the issue mentioned by @dannylesnik addressed ,thanks. |
This PR turns the newly merged but not yet released Couchbase connector around based o the work done for Akka Persistence Couchbase.
Compared to the earlier implementation by @dannylesnik it
CouchbaseSession
which is appropriate for one-off requests to CouchbaseCouchbaseSession
instancesCouchbaseSource
,CouchbaseFlow
andCouchbaseSink
to essential ones